LinkedIn Interview Question

Difference between JQuery getelement by id vs Javascript.

Interview Answer

Anonymous

May 12, 2015

JQuery getelement by id will return Jquery object which wraps the DOM element including all jquery methods. while javascript getElementById function returns the DOM object itself. Also one more difference is that we can not use any jquery special characters like $ or # in the Element ID while using javascript method we can use these characters.

1