Call jQuery from javascript console when using JSFiddle

In my debugging and building process, it is typical to run several jQuery commands from the javascript console (firebug in firefox or chrome built-in) just for checking and testing. I noticed that I cannot interact with any elements on the JSFiddle page using jQuery () call, and that $ () is not behaving normally either (I assume it is related to mootools or X other framework?) Looking at the script list used on the page tells me that the jQuery library is loading.

Any ideas on how I can call something simple like jQuery ("body"). toggle ("slow"); from firebug console or chrome javascript? Any easy way to find out jQuery binding?

not that it is necessary, but here is jsfiddle using jQuery for your testing purposes. http://jsfiddle.net/HHecw/

Thanks!

+4
source share
1 answer

You use the console directly in the jsFiddle frame.
jsFiddle uses MooTools, not jQuery.

To interact with your page from the console, you need to immediately open the "result" frame, http://fiddle.jshell.net/HHecw/show/light/

+6
source

Source: https://habr.com/ru/post/1384729/


All Articles