Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery: how do i know if i have it?

i need jquery to work on a browser locally. how do i know if it is installed and how do i install it ?

my question is specific to being able to run this code:

onmouseover="evt.target.setAttribute('opacity', '0.5'); $('#someDiv').show();"
onmouseout="evt.target.setAttribute('opacity', '1'); $('#someDiv').hide();"
like image 321
Alex Gordon Avatar asked Aug 24 '10 23:08

Alex Gordon


People also ask

How do I know what version of jQuery I have?

Type this command in the Chrome Developer Tools Javascript console window to see what version of the jQuery is being used on this page: console. log(jQuery(). jquery);

Does jQuery need to be installed?

If you don't want to download and host jQuery yourself, you can include it from a CDN (Content Delivery Network).

Is jQuery included in JavaScript?

JQuery is a JavaScript library. It would not have been invented had JavaScript was not there. jQuery is still dependent on JavaScript as it has to be converted to JavaScript for the browser in-built JavaScript engine to interpret and run it.

Is this JavaScript or jQuery?

JQuery and JavaScript are actually the same. JQuery is a group of JavaScript libraries designed for DOM operations in HTML page such as animation, event handling, traversing and Ajax interactions. A strong hold on JavaScript is necessary to use either of the two scripting languages.


1 Answers

You can test if jQuery is loaded by opening your javascript console (in Chrome: Settings > More tools > Javascript console).

Where the little blue arrow appears type:

if(jQuery) alert('jQuery is loaded');

Press enter.

like image 52
davidhaynz Avatar answered Oct 21 '22 00:10

davidhaynz