samedi 28 février 2015

how to implement this jquery for preview



I have a jQuery to display pictures as thumbnail for a document library. It works great but as soon as I add grouping to the view then the pictures do not show up as thumbnail. They show up with traditional file type icons (icjpg.gif, icpng.gif, etc.). Any idea how to fix this?



<SCRIPT type=text/javascript>
$(document).ready(function(){
$("img[src$='icjpg.gif'], img[src$='icpng.gif']").each(SetImage)
});
function SetImage()
{
$(this).attr('height','100');
$(this).attr('src','/it/Site/DocLib/'+$(this).attr('title'));
}
</SCRIPT>







0 commentaires:

Enregistrer un commentaire