optimization image check.
This commit is contained in:
parent
2b57e170ef
commit
2ff24841fd
|
@ -625,15 +625,11 @@ $(document).ready(addFormObserversForDoubleSubmit);
|
|||
function img_thumbnails() {
|
||||
$('.thumbnails a').colorbox({rel:'nofollow'});
|
||||
$('.attachments').find('a').each(function(index, element) {
|
||||
if($(element).attr('href').indexOf('.jpg') > 0) {
|
||||
var href_value = $(element).attr('href');
|
||||
if (/\.(jpg|png|gif|bmp)$/.test(href_value)) {
|
||||
$(element).colorbox({rel:'nofollow'});
|
||||
}
|
||||
if($(element).attr('href').indexOf('.png') > 0) {
|
||||
$(element).colorbox({rel:'nofollow'});
|
||||
}
|
||||
if($(element).attr('href').indexOf('.gif') > 0) {
|
||||
$(element).colorbox({rel:'nofollow'});
|
||||
}
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
$(document).ready(img_thumbnails);
|
||||
|
|
Loading…
Reference in New Issue