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
Javascript: How to return response from asynchronous ajax call
The next piece of code tries to return the response fron an ajax asynchronous call but with this we can only get undefined values: functi...
JavaScript closure inside loop example
When we want to bind a variable within an anonymous function unchanging value outside of the function, you can implement the following javas...
IOS: Difference between atomic and non-atomic attributes
What do atomic and nonatomic mean in property declarations? @property ( nonatomic , retain ) UITextField * userName ; @property ( atomi...
iOS How to send SMS with iPhone
Restrictions If you could send an SMS within a program on the iPhone , you'll be able to write games that spam people in the backgrou...
How to embed custom font in iOS iphone app
iOS 3.2 and later support this. Straight from the What's New in iPhone OS 3.2 doc: Custom iOs Font Support Applications that want to us...
No comments:
Post a Comment