Skip to content

Tag: jquery

Deselect all selected rows in DataTables

I’m using jQuery Datatables plugin (v 1.10) I am using the select feature and can highlight/select rows fine. I’m also using paging. I can page through the tables and select on multiple pages. I tried to create a button to clear selected rows, but it only clears rows selected on the current page. …

Retrieve naturalWidth of updated image src

I am using jQuery in Rails4 to update the src attribute of an image. I am also using paperclip for image uploading. The flow: when I click the image in the first time, it returns the thumb width(140px). However, the subsequent clicks return the natural width of the original image(1200px). Is it possible to ge…

Smooth Scrolling jumps weirdly

I’m working with a nav bar that becomes fixed with a screen max-width < 1000px. The height of the navigation bar is 60px. So it goes backwards with animation 60px if max-with < 1000px. All this works fine, but my problem is that the page jumps weirdly only when the viewport is bigger than 1000px. Answer…