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
Applying CSS to an iframe
There are two different things here: the style of the iframe block and the style of the page embedded in the iframe. You can set the style o...
Objective-C: How to check if a string contains another script
To check if a string ( NSString ) contains another small string this is the code: NSString * string = @ "hello bla bla" ; if ...
Android: How to get screen width and height
If you want the display dimensions in pixels you can use getSize : Display display = getWindowManager (). getDefaultDisplay (); Point ...
PHP: MySQL vs Mysqli
More beyond that performance mysqli have others relevant features: If you have a look at MySQL Improved Extension Overview , it should tel...
PHP: Check if string contains specific word
You can use the strpos function which is used to find the occurrence of one string inside other: if ( strpos ( $a , 'are' ) !== ...
No comments:
Post a Comment