javascript - Function doesn't work in safari on windows -


while syntax works on other browser, safari on windows throws error

$("#kibana").contents().find('.navbar-nav')[0].remove(); 

the error is

typeerror: 'undefined' not function  

the element exist. checked using debugger.

why happening?

when use [] on jquery object, retrieving underlying dom node. .remove isn't cross-browser compatible on native dom elements.

instead, can use .eq retrieve element while still having wrapped in jquery. way can use cross-browser comptabile .remove method:

$("#kibana").contents().find('.navbar-nav').eq(0).remove(); 

Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -