How to work with Jquery Mobile Collapsible and Ajax Synchronous?

Asked

Viewed 51 times

0

Gentlemen, I have a Collapsible that when clicked calls a synchronous Ajax and displays the results within it. I’m having to make when it is clicked display that gif until you get the answer from Ajax. The problem is that as it is synchronous the Collapsible does not open until the function reaches the end, even if I use the function collapsible( "expand" ).

See the code:

<div id="expansor" data-role="collapsible" data-collapsed="true">

            <h4 id="expansorTitle">Teste.</h4>

            <input id="imgCarregando" type="image" src="img/carregando.gif" />
            <div id="resultadoAjax"></div>
        </div>

$(function() {

      $("#expansorTitle").click(
            //Meu Ajax síncrono     
      });

});

Can someone help me?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.