I need to refer jquery in spBodyOnLoadFunctionNames.push function. I am doing it like below
_spBodyOnLoadFunctionNames.push("Testfunction"); function Testfunction() { }but because of two script tag, there is a problem. my master page does not include jquery. and one button uses jquery of which code is out of my control If I add simple jquery reference, it works after page refresh and not instantly. so I am trying with this way. any other idea will be better. Thanks
Testfunctionright? I understand you're saying there is another control on the page that loads jQuery independently and that you cannot modify it -- but what do you mean by "it works after page refresh and not instantly"? What works? Does the function fire or you can get a jQuery reference on the page? It would help if you posted at least a summary of what your script does, more helpful would be the entire source -- and it would really help to know how you're adding the script to the page