Nope...no go.

All I have for the "tabs" are just straight links calling the script to load
the page.

$('a.profile_data').click(function(){
        var url = $(this).attr('href');
        //alert(url);
        $('#loadHere').fadeOut('fast', function(){
                $('#loadHere').load(url, function(){
                        $('#loadHere').fadeIn('fast');
                        });
                });
        return false;
        });

Dave 

-----Original Message-----
From: Liam Potter [mailto:radioactiv...@gmail.com] 
Sent: August-04-09 12:50 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Newbie Question


<script type="text/javascript">
function _ajaxInit() {
   $("a.group").fancybox(
    {
     'overlayShow': true
    });
   });
        window.onload = 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);
                }
            });
        });
        }
_ajaxInit();
</script>

if that doesn't work, call _ajaxInit() on the tabs callback function

Dave Maharaj :: WidePixels.com wrote:
> I have a standard php page with some jquery going on its working fine.
>  
> Now I want to take that page and load it into a div on a different 
> page (tabbed layout pretty much) but when I do the script no longer 
> works when the page loads into the div.
>  
> SCRIPT CURRENTLY ON THE PHP PAGE THAT WORKS WHEN VIEWED DIRECTLY IN 
> BROWSER
>  
> <script type="text/javascript">
> $(document).ready(function() {
>    $("a.group").fancybox(
>     {
>      'overlayShow': true
>     });
>    });
>         window.onload = 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);
>                 }
>             });
>         });
>         }
> </script>
>  
> How can I get it to still work when loaded into the DIV?
>  
> Thanks
>  
> Dave

Reply via email to