0
我需要這個代碼採取不同大小的字母 - 圖像格式,例如「JPG和JPG,GIF和GIF「等 也不宜服用,例如,不要在那裏」 .JPG「在鏈路結束後,將它白白爲」 jpg.html 」。 也可以補充一點,豁免不想尋找域「imageshack」?查找地址鏈接的結束與圖像格式的鏈接(如JPG,PNG,GIF等)
$(document).ready(function() {
$('a.postlink').filter(function() {
return $(this).attr('href').match(/\.(jpg|png|gif|jpeg)/);
}).addClass('lightview');
});
感謝和抱歉我的英語。
這不工作只爲爲.jpg,.png的.jpeg和.gif – Edoras 2012-02-06 14:57:06
試試我的編輯答案。 – ShankarSangoli 2012-02-06 15:00:31