Javascript how i can don't apply plugin to id if he not exists.
$('#wyswig_comment').wyswig();
// Initialization
$.fn.wyswig = function(options)
{
if (isiOS() || detectAndroid() || detectAndroidWebKit()) return false;
var obj = new Construct(this, options);
obj.init();
return obj;
};
If #wyswif_comment not exists in DOM in IE i have error. How check in initializtion function hav element with this id or not.
以上就是how i can don't apply plugin to id if he not exists的详细内容,更多请关注web前端其它相关文章!