Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

schmoboy's Profile

GitHub User: schmoboy

Comments by

Avatar

Ok, the jQuery selector in the javascript to prevent ajax from sending a request to the server for the pagination links which have an href='#' is...

ruby
$('#products th a, #products .pagination a[href][href!="#"]').live('click',

This prevents attaching a click event to pagination links where href='#'.

Avatar

The javascript to handle the pagination link clicks sends the ajax for even the pagination links that are disabled. Even though their href is "#". Is there a way to filter out the live() call to not include the items in the pagination links which have a class of 'disabled' or 'active'?