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: Remove duplicated elements from a bidimensional array PHP
Example array: Array ( [ 0 ] => Array ( [ 0 ] => abc [ 1 ] => def ) [ 1 ] => Array ( ...
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 solve: MySQL: You have an error in your SQL syntax; check the manual that corresponds...
This error is often caused because you forgot to properly escape the data passed to a MySQL query. An example of what not to do (the ...
How to read/write a MS Word file from PHP
Reading binary Word documents would involve creating a parser according to the published file format specifications for the DOC format. I th...
How to: Perform an AJAX Synchronous request
From the Jquery docs : you specify the async option to be false to get a synchronous Ajax request. Then your callback can set some data befo...
No comments:
Post a Comment