$.get( css_selector, [force] )
Parameters
Returns
$.get() function fetches all the matched elements in a webpage using a valid CSS selector as input. The matched HTML elements will be wrapped with Nedil APIs and returned. This functionality checks for browser's default support for querySelector, if default support is not available Nedil's own selector api will do the job. Providing "force" parameter with "false" will force NedilJS to use it's own selector api.
Providing HTMLElement instead of "css selector" will simply wrap the HTMLElement with Nedil APIs (i.e) Nedil.Objs will be created using the given HTML Element.
Nedil Objects (or) Nedil.Objs (or) $.objs is explained separately.
Example 1
Gets all div elements in a webpage. This example will provide Nedil.Objs which has two div elements.
JS
HTML
Example 2
// select all div elements in the page $.get("div");
Gets the HTML element with id "super" in the webpage.
JS
HTML
Example 3
// select element with id "super" $.get("#super");
Gets all HTML elements with class name "top" in the webpage.
JS
HTML
// select all elements with class "top" $.get(".top"); | ||||||||||||||||||||