jQuery Proven Performance Tips & Tricks
September 17th, 2011
No comments
jQuery Proven Performance Tips & Tricks
View more presentations from Addy Osmani
Kjell-Sverre Jerijærvi publish on his blog simple solution which set column width in lists and libraries through jQuery without converting view into XSLT Data View in SPD. Magical piece of code looks very simple:
<!–ADJUST TABLE COLUMN WIDTH–>
<script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js” type=”text/javascript”></script>
<script type=”text/javascript”>
$(function(){
$(“TH.ms-vh2-nograd:contains(‘Status description’)”).css(“width”, “150px”);
$(“TH.ms-vb:contains(‘Type of Work’)”).css(“width”, “150px”);
});
</script>
whole article is on link SharePoint jQuery: Setting View Column Width