I have a problem with my jquery function in a wordpress theme. I used this particular function in harsh times, and it worked. The function returns the identifier of the image that was downloaded through the wordpress loader.
Here is the relevant part:
// extract the img-ID from class attribute
var jt = jQuery('img', html).attr('class');
alert(html);
alert(jt);
j1 = jt.split(' ');
Both alerts are only for finding out what is happening. alert (html) returns this:
<img src="http://www.xyz.com/files/2012/03/stage.jpg" alt="" title="" width="1000" height="371" class="alignnone size-full wp-image-6" />
but alert (jt) returns "undefined".
Any idea? It would be great if you could help.
Jan
jabre source
share