How to know jQuery version using Firebug console

This is a little tip for today: sometimes, you don’t have access to know what version of jQuery is loaded in a website or web application, so you can use the Firebug console to know what version is actually loaded. Just, type one of the next lines and you will obtain that data. Both major…

The easiest way to check if an element exists with jQuery

When you need to know if an element exists in the DOM (Document Object Model), only uses this small code: <script type=”text/javascript”> (function($){ $(document).on(‘ready’, function(){ if( $(“element”).length ){ // Do something 🙂 } }); })(jQuery); </script> The length property returns the number of elements that match with our selector. For example, imagine that you have the…