I have a drupal 7 site and I'm loading a theme level jquery script by adding this in my .info file:
scripts[] = script.js
I want it to move an views ajax pager every-time a link is clicked (link changes vote on content like on hotornot.com). Exact code I'm using in my script.js is below and so far it's working, but it only works on the first click and not afterwards. How can I have this $("li.pager-next a").click();
happen on EVERY click of a.ratebutton
?
(function($) {
$(document).ready(function() {
$("a.rate-button").click(function(){
// $(this).hide();
$("li.pager-next a").click();
// window.location = $("li.pager-next a").attr('href');
});
});
}(jQuery));