You make an AJAX call within a jQuery function and you want the call to be synchronous so that you can use the data from the call in the function scope. This tutorial will show you how.
Posts Tagged jquery
On my first post on this blog I posted a small snippet to use a small regex pattern in jQuery selectors. This doesn’t work anymore, go here for a working method: http://ropox.net/archives/1081
I found out that jQuery has a nice little method for loading external scripts into the page at run time called getScript(). It basically gets the contents of the external file using an AJAX request and then eval()s the code at runtime, which seems like a perfect way of doing it. I reckon it’s much better than appending new <script> tags to the <head> tag as well.
Some concepts for creating a client side MVC (or VC in this case) framework.
This is just a quick tutorial (more of a code snippet) for creating a very simple plugin for jQuery.
Of course, there are lots of tutorials around for this, this is mainly for reference
$.fn.myFunction = function()
{
// use the following loop to iterate through all objects
// returned by the jQuery selector which was used
return [...]