-3

I'm using this plugin:

  • Open the plugin
  • if u click an image it opens up a big one. when you closing it, the BODY should scroll up.

I want to make scroll to the top on click close.!

perhaps: adding a class self.$item.addClass( 'not-expanded' ); could work?but doesn't.

    if ($('.not-expanded').is(':visible')) {
         $('html').animate({top:'110px'}, 800 );
    }
DD77
  • 1,367
  • 2
  • 13
  • 25

1 Answers1

0

Apparently, the only way to close the big image is clicking on the cross in the right top corner of the div. I suggest that you go in the .js file that animate the "slideUp" of the div when you click on the cross and add a callback function to this animation with your scrolltop.

Djouuuuh
  • 1,147
  • 8
  • 16
  • $body.animate( { scrollTop : mydiv? }); something like that on the close function? – DD77 Apr 18 '13 at 15:25
  • thanks, u helped me to solve it. $body.animate({scrollTop:$('#work').position().top}, 'slow'); – DD77 Apr 18 '13 at 15:30