Vorlage:FlogrThumbs: Unterschied zwischen den Versionen

Aus RTW

(title and counter)
(first element right away)
Zeile 10: Zeile 10:
 
jQuery.get(url, function(data) {
 
jQuery.get(url, function(data) {
 
var title = data.match(/.*<span id=['"]page_title['"]>([\s\S]+?)<\/span>.*/ig);
 
var title = data.match(/.*<span id=['"]page_title['"]>([\s\S]+?)<\/span>.*/ig);
var pictures = data.match(/.*<div id=['"]thumbnail_container['"]>([\s\S]+?)<\/div>.*/ig);
+
var pictures = data.match(/.*<div id=['"]thumbnail_container['"]>([\s\S]+?)<\/div>.*/ig)[0];
 
var count = pictures.match(/<img /ig).length;
 
var count = pictures.match(/<img /ig).length;
 
jQuery(flogrthumbDomId).removeClass('loading').html(
 
jQuery(flogrthumbDomId).removeClass('loading').html(
pictures[0] +
+
pictures +
 
'<strong>' + title + '</strong>' +
 
'<strong>' + title + '</strong>' +
 
'(' + count  + ')'
 
'(' + count  + ')'

Version vom 24. Oktober 2011, 10:58 Uhr