Posted By

surfeurX on 11/17/09


Tagged

jquery


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

millano5
wirenaught
Balamir


bookmarklet with jquery


 / Published in: JavaScript
 

  1. <a href="javascript:void((function(){
  2. if (typeof(jQuery) != 'function') {
  3. var noeud_js = document.createElement('script');
  4. noeud_js.setAttribute('src', 'http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js');
  5. document.getElementsByTagName('head')[0].appendChild(noeud_js);
  6. }
  7.  
  8. function verif_loaded(){
  9. if (typeof(jQuery) == 'function') {
  10. clearInterval(interval);
  11. code();
  12. }
  13. }
  14. var interval = window.setInterval(verif_loaded, 100);
  15. function code(){
  16. $(document.body).css('background-color','yellow');
  17. }
  18. })())">Bookmarklet avec jquery</a>

Report this snippet  

You need to login to post a comment.