Comments (2)
Simply bind an event to a dom or the document node:
$('#wrapper')
.bind('profileNameAjaxStart', function(){
$(this).addClass('profileName-is-loading');
})
.bind('profileNameAjaxStop', function(){
$(this).removeClass('profileName-is-loading');
})
;
And then somewhere later do your requests:
$.manageAjax.add('profileName', {
success: function(html) {
$('ul').append('<li>'+html+'</li>');
},
url: 'test.html'
});
from ajaxmanager.
So I could bind it
$(document)
as I would with
$(document).ajaxStart()
Is there a difference between yours and ajaxStart?
On 9/13/2011 3:09 PM, Alexander Farkas wrote:
Simply bind an event to a dom node:
$('#wrapper') .bind('profileNameAjaxStart', function(){ $(this).addClass('profileName-is-loading'); }) .bind('profileNameAjaxStop', function(){ $(this).removeClass('profileName-is-loading'); }) ;
And then somewhere later do your requests:
$.manageAjax.add('profileName', { success: function(html) { $('ul').append('<li>'+html+'</li>'); }, url: 'test.html' });
from ajaxmanager.
Related Issues (18)
- Using async: true works only once HOT 1
- (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]" nsresult: "0x80040111 HOT 2
- Ajax Complete + Error Status Code not working HOT 5
- When using cached results XHR object is not available for querying HOT 3
- IE6 null or not an object error HOT 3
- When using JSONP, callbacks don't seem to be fired HOT 3
- JSLint Conformance HOT 3
- error in getting jsonp HOT 1
- Typo 'preventDoubbleRequests' for ajax queue initialization option HOT 1
- incompatible jquery 1.5.1 ? HOT 6
- JQuery 1.5 DataType Bug HOT 3
- How to use with deferred ajax? HOT 3
- Calling Ajaxmanager with the returned ajaxmanger-Object not working for me.
- few issues
- Prevent Double Posts Does not work
- Possible To combine this plugin with jquery form plugin?
- Undefined exception when calling clearCache in bad moment
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ajaxmanager.