JQuery will not find an element with an ID Selector, but will only find it with an identifier

I am developing an ASP.NET application and am using jQuery. I have item <div>c id='slider'. When trying to access an element using, $('#slider')it returns null, but when trying to access it without a selector, i.e. $('slider')returns the item.

What could be the reason?

+3
source share
2 answers

If the selector does not match, then jQuery does not return null. So the two meanings are “Acting, as opposed to jQuery,” which assumes the answer: is $not jQuery on your page.

- . , mootools prototype.js( , , , , $, , CSS).

+6

, .

: jQuery noconflict. jquery, $ , , jquery $.

: api.jquery.com/jQuery.noConflict/

0

All Articles