Menu
Home
Recent Posts
"exists" function in jQuery
7:43 AM
0
Share
For verify the existence of an element in jQuery this is the piece of code:
jQuery
.
fn
.
exists
=
function
(){
return
this
.
length
>
0
;}
if
(
$
(
selector
).
exists
())
{
// Do something
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Development and programming answers
Search articles
Popular Posts
How to solve: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given
First and foremost: This happens when you try to fetch data from the result of mysql_query but the query failed. This is a warning and...
How to: detect a click outside an element with jQuery
Attach a click event to the document body which closes the window. Attach a separate click event to the window which stops propagation to th...
How to solve: Notice: Array to string conversion
This simply happens if you try to treat an array as a string: $arr = array ( 'foo' , 'bar' ); echo $arr ; // Notice:...
How to solve: Warning: Division by zero
The warning message 'Division by zero' is one of the most commonly asked questions among new PHP developers. This error will not ca...
How to Deserialize JSON into C# dynamic object
An alternative deserialisation approach is suggested here . I modified the code slightly to fix a bug and suit my coding style. All you need...
No comments:
Post a Comment