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 migrate applications for iphone 5 resolution
The new iPhone 5 display has a new aspect ratio and a new resolution (640 x 1136 pixels). To make applications "universal" for b...
How to: Compare decimals in PHP
$a = 0.17 ; $b = 1 - 0.83 ; //0.17 if ( $a == $b ){ echo 'a and b are same' ; } else { echo 'a and b are not sam...
How to debug: unexpected T_STRING PHP
T_STRING is a bit of a misnomer. It does not denote a "string" , but refers to raw identifiers like name , bare words / plain t...
How to: URL Rewrite with PHP
Covert this URL: url . com / picture . php ? id = 51 to this another picture . php / Some - text - goes - here / 51 You can essenti...
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...
No comments:
Post a Comment