Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to refresh jquery-ui dynamically?
    primarykey
    data
    text
    <p>I am using jquery,jquery-ui and other libraries, in a bookmarklet. Only the custom process reside in the bookmarklet. jquery-ui is loaded from an external script, I made a copy on my web storage (just for compatibility reasons). To do this, I am using a piece of code:</p> <pre><code>function $L(c,f){ if(window.jQuery) {/* mark all previous occurences of this script then remove it*/ var l=$("script[src^=\""+c+"\"]"); if(l.length&gt;0) { var n=l.length; for(j=0;j&lt;n;j++) l[j].setAttribute("class","__remove"); $(".__remove").remove(); } } var s=document.createElement("script"); s.addEventListener("load",function(){ f(); }); s.setAttribute("src",c+"?"+timestamp); /*document.getElementsByTagName("head")[0].appendChild(s);*/ var h=document.getElementsByTagName("head")[0]; h.insertBefore(s,h.firstChild); }; </code></pre> <p>then:</p> <pre><code>$L(jquery_ui,function(){ /* do stuff */ }); </code></pre> <p>What i'd like to do is the bookmarklet always use the most recent version of jquery-ui in my repository, whenever the user click on the bookmarlet. Not only at the time the page is refreshed or when he went to another page on the site.</p> <p>The jquery-ui script file on the server is supposed to change for any reason (app upgrading) Everything goes well, when clicking the bookmarklet, the script is reloaded. When I modify the jquery-ui file on the server, then clicking on the bookmarklet, the version change. But after a second changement, I am stuck, no version change.</p> <p>So I guess there is an issue with the variable $ui. What can I do to avoid this?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload