jeudi 1 janvier 2015

Edit masterpage, need to add jQuery - how to ensure it does not duplicate?



SharePoint 2010 Server. I edited section of my masterpage like this(in sharepoint designer, not programmatically):



<script type="text/javascript" src="http://ift.tt/t0Y3fx"></script>


But how can I ensure that I don't connect jQuery twice? Something like this



<script>if (typeof jQuery == 'undefined') {
// jQuery is not loaded}
else {
// jQuery is loaded
}
</script>


but how can I dynamically load jQuery from here? Or if I edit .masterpage, I should look by myself if there is no jQuery already added?








0 commentaires:

Enregistrer un commentaire