Is there an “exists” function for jQuery ?

Solution :
JQuery.fn.exists = function(){ return this.length>0; }
if ( $(selector).exists() ) {
// Do something
}
There you go!
Cheers !
Hope you got the Ans !
still having probs ? let me know by comments !
Know More About :
PHP Freelancing India



Great articles and useful information for readers. Thanks for sharing such good articles. hire php developer
ReplyDeletehire php programmers
I enjoyed reading this detailed and practical blog post. The information is clear and easy to apply in real life. Great work on this article.workday hcm course
ReplyDeleteInsightful post! Our Gcp data engineer course online
ReplyDeletehelps learners master Google Cloud Platform tools like BigQuery, Dataflow, Pub/Sub, Cloud Storage, ETL pipelines, and real-time data processing. It is job-oriented with hands-on practice and real-world projects, helping students and professionals improve productivity and build strong career opportunities in cloud and data engineering roles.