Sometimes dymanic web pages are really problematic for styling purposes.
One situation is to style an AJAX Throbber / Spinner in Drupal, which hides very fast (in most situations ;)) and is only hardly stylable though. In this blog entry I'm describing a trick to keep the AJAX Throbber visible in its position.
The throbbers HTML Code (what are we talking about)
Drupal throbbers (example in AJAX views) normaly have a HTML code like this (which may help some people in styling, if the following trick is too hard to understand for non-tech people):
Keep Drupal AJAX throbber visible via JavaScript trick
To keep the trobber visible after the first ajax request, just copy the following snippet into your browser console (Firebug e.g.) and fire it!
jQuery( document ).ajaxSend(function() {
i_am_a_dummy_that_doesnt_exists();
});
What it does?
The snippet simply creates a JS error, which breaks the AJAX request handling and keeps the throbber visible after starting the request.
So never use this in productive code! This is just for your local browser console ;)
Please leave a comment, if this helped you, too. =)