Posted By

dvdrtrgn on 09/18/08


Tagged

jquery bookmarklet scriptlet


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

dvdrtrgn


jQuify


 / Published in: JavaScript
 

This checks for jquery on the page, adding a green border if yes. If not already there, load the latest...add a red border. Asks if you want the API.

  1. javascript:try{_c='green';void(jQuery);}catch(e){_s=document.createElement('script');_s.src='http:/'+'/code.jquery.com/jquery-latest.js';document.getElementsByTagName('body')[0].appendChild(_s);_c='red'}finally{_f=function(){$('body').css('border','1px solid '+_c);if(_c==='green'&&typeof jQuery!='undefined'&&confirm('API?'))_w=window.open('http:/'+'/docs.jquery.com/Core')};void(window.setTimeout(_f,999))}

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: dvdrtrgn on November 29, 2009

This checks for jquery on the page, adding a green border if yes. If not already there, load the latest, then add a red border.

You need to login to post a comment.