views:

7

answers:

0

Hi, I have been trying to extract the pager functionality from some javascript code to display some categories. This would allow me to re-use the same logic. I have the following click event wired up for when the first page link is clicked:

$('.first-page').click(function(e) { e.preventDefault(); displayCategories(1); });

As you can see this calls the displayCategories method which i would need to extract aswell. Effectively i'd like to be able to trigger an event i can subscribe to within my categories code.

My last question was similar but my hacky solution that time won't pass this time. I'd really appreciate it if someone could help. Thanks