Hi I'm not exactly sure what you mean by "loaded into a div" but I assume
that this script is being loaded into the document after the document/window
is already ready.

It is possible you need to remove the $(window).ready event. Maybe the bound
ready functions have been triggered already and are not being triggered
again.

Regards,
Cam

On Tue, Sep 8, 2009 at 10:29 AM, Dave Maharaj :: WidePixels.com <
[email protected]> wrote:

>  I have this on a page that gets loaded into a div but its not working
> when loaded. I originally had the page load normally in the browser and it
> worked, only since loading it into the div has it stopped. Not sure if it
> has anything to do with it but i want to add
>
> .live() to the function and give it a try but no idea where to add it just
> to see if that does anything.
>
> Or does anyone have any ideas that might help me to get this working again.
>
> $(window).ready(function() {
>  $('.sliderGallery').each(function(){
>   var id_parts = $(this).attr('id').split('_');
>   var id = id_parts[id_parts.length - 1];
>   var container = $('#sliderGallery_' + id) ;
>
>
>   var ul = $('ul', container);
>   var itemsWidth = ul.innerWidth() - container.outerWidth();
>
>    $('.slider', container).slider({
>      min: 0,
>      max: itemsWidth,
>      handle: '.handle',
>      stop: function (event, ui) {
>       ul.animate({'left' : ui.value * -1}, 500);
>      },
>      slide: function (event, ui) {
>       ul.css('left', ui.value * -1);
>      }
>    });
>  });
> });
>
> Thanks,
>
> Dave
>

Reply via email to