Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

Syntax for jquery in console

$
0
0

At times when debugging my code, I need to change the properties of an HTML element on the fly.  Normally I would do this by hitting F12, and in the console window, type something like this:

document.getElementById("someButton").disabled = true;

and hit enter and then, in this case, the button with the id someButton would be disabled.  This works great.

I wanted to use jquery, so I did something similar:

$(“#someButton”).prop("disable",false);  

but this is what ends up being displayed in the console window:

"Unable to get property 'apply' of undefined or null reference"

This leads me to think that the element with id someButton is not found or maybe jquery doesn't recognize it or I need another step.  This isn't a very important problem since I can accomplish what I want with plain js but it bugs me that I can't figure out to do it the jquery way.


Viewing all articles
Browse latest Browse all 3527

Trending Articles