Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- *** content is wrapped in containers with ids of "cats" and "dogs"
- *** pagination is wrapped in containers with ids of "cats_pagination" and "dogs_pagination"
- */
- jQuery(function($) {
- $('#cats').on('click', '#cats_pagination a', function(e){
- e.preventDefault();
- var link = $(this).attr('href');
- $('#cats').fadeOut(500, function(){
- $(this).load(link + ' #cats', function() {
- $(this).fadeIn(500);
- });
- });
- });
- $('#dogs').on('click', '#dogs_pagination a', function(e){
- e.preventDefault();
- var link = $(this).attr('href');
- $('#dogs').fadeOut(500, function(){
- $(this).load(link + ' #dogs', function() {
- $(this).fadeIn(500);
- });
- });
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement