Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery functions stop working on page load with ajax
    primarykey
    data
    text
    <p>this is the first time i m try to do something load pages with ajax.</p> <p>This is works fine on a couple pages, but somepages with a slide or another jquery function, the scripts stop working, i see something about i need to call the functions again, but i dont know where on my code is the right place, like i need to call on loaded page.</p> <p>there is my javascript code</p> <pre><code>$(document).ready(function(){ preload([ '/img/bg_body_topo.jpg', '/img/img_topo.png', '/img/logo_topo.png' ]); $("a[rel*=outside]").attr( "target", "_blank" ); $('#scrollbar').tinyscrollbar({ sizethumb: 55 }); $('#menu-topo ul li ul').hide(); $('#menu-topo ul li').hover(function(e) { $(this).find('ul').stop().fadeToggle("fast"); }); $("#home-slide-destaques").scrollable({ circular: true }).autoscroll({ autoplay: true }).navigator(".controles"); // DISCOGRAFIA $("ul#int-abas-discografia").tabs("div#int-conteudo-discografia &gt; div", { effect: 'fade' }); // INTEGRANTES $("ul#int-abas-integrantes").tabs("div#int-conteudo-integrantes &gt; div", { effect: 'fade' }); var content = $('#content'); //pre carregando o gif loading = new Image(); loading.src = '/img/103.gif'; $('#menu-topo a, a#menu-ajax').live('click', function( e ){ e.preventDefault(); var tHeight = $('#wrapper').height(); var tWidth = $('#wrapper').width(); var posicao = $('#wrapper').position(); $('#carregando').remove(); $('#imgcarregando').remove(); $('#wrapper').prepend('&lt;div id="carregando"&gt;&lt;/div&gt; &lt;div id="imgcarregando"&gt; &lt;img src="/img/103.gif" style="margin:280px 0 0 0;" alt="Carregando"/&gt;&lt;/div&gt;'); $('#carregando').css({ 'position': 'absolute', 'width': tWidth, 'height': tHeight, 'top': posicao.top, 'left': posicao.left, 'background': '#000', 'opacity': '.60', 'z-index': '9900', 'text-align': 'center' }); $('#imgcarregando').css({ 'position': 'absolute', 'width': tWidth, 'height': tHeight, 'top': posicao.top, 'left': posicao.left, 'background': '#000 url(/img/logo_topo.png) center 200px no-repeat', 'padding': '30px 0 0 0 ', 'opacity': '.88', 'z-index': '9999', 'text-align': 'center' }); content.html( '' ); var href = $( this ).attr('href'); $.ajax({ url: href, success: function( response ){ //forçando o parser var data = $( '&lt;div&gt;'+response+'&lt;/div&gt;' ).find('#content').html(); //apenas atrasando a troca, para mostrarmos o loading window.setTimeout( function(){ content.fadeOut('slow', function(){ $('#carregando').fadeOut('slow'); $('#imgcarregando').fadeOut('slow'); $('#content').height('auto'); // DESTAQUES content.html( data ).fadeIn(); }); }, 1000 ); } }); }); }); function preload(arrayOfImages) { $(arrayOfImages).each(function(){ $('&lt;img/&gt;')[0].src = this; // Alternatively you could use: // (new Image()).src = this; }); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload