0 Replies Latest reply on Mar 21, 2012 8:40 AM by Ani Capil

    jQuery Cloud Zoom script so that it runs when the user clicks

    Ani Capil Newbie

      Hi!

       

      This works fine when i hover on image, but i want it works when user clicks on it.

      I know this is JQuery but ll appeiciate all help :-).

       

      function zoomModelImageAndMakeDraggable(){

           jQuery("a.modelThumbnail").fancybox({

                           'titleShow'                : true,

                           'titlePosition'            : 'inside',

                           'hideOnOverlayClick'     : false,

                           'overlayShow'             : false,

             

                           onComplete: function(arg) {

                               jQuery("#fancybox-wrap").draggable();

       

                               jQuery("#fancybox-title").hover(function() {

                                       jQuery("#fancybox-wrap").draggable({ disabled: true });

                                   }, function() {

                                       jQuery("#fancybox-wrap").draggable({ disabled: false });

                                   });

       

                               jQuery('#fancybox-img').wrap(

                                       jQuery('<a>')

                                       .attr('href', jQuery(arg[0]).attr('href'))

                                       .addClass('cloud-zoom')

                                       .attr('rel', "position: 'inside'")

                                   );

                               jQuery('.cloud-zoom').CloudZoom();

                           }

          });

      }