Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to determine if a web page is jquery-enabled?

What is the best way to determine if a webpage is jquery enabled? Using jquery itself if that's the best way to determine it.

like image 653
Jim_CS Avatar asked Dec 25 '11 20:12

Jim_CS


1 Answers

if(jQuery) //jquery object exists

jQuery isn't magic - it's essentially just a big object. You can check for it like you would any other object.

Same thing to ensure libraries within jQuery are loaded:

if(jQuery.DatePicker) //lib exists
like image 198
Calvin Froedge Avatar answered Sep 18 '22 01:09

Calvin Froedge