Blog

Providing Custom Solutions for your Business

Offshore Web Development and Website Design Solutions to businesses of all statures
  • 0

    How jQuery Selectors can make your process easy with quick response

    Posted by:

    jQuery is a very strong JavaScript library generally used for DOM manipulations. As the name suggests ‘Query’ you can query(traverse) the DOM and do the manipulations. jQuery is a very powerful JavaScript platform that brings DOM manipulations handy with just few lines of code.wholesale jerseys Though its just a wrapper to plain JavaScript but, undoubtedly it enhances its powers and gives flexibility and that too with a small snippet of code. JQuery mainly plays around using ‘selectors’. Selectors can be looked upon as a ‘query’ i.e. based on the selector it queries(selects) elements from the DOM and returns as jQuery object. It should be noted that, when matched elements are more than one then what is returned by jQuery is array of objects. I have filtered out some of the common though important selectors that you may find useful.You can find a complete list of selectors on official site of jQuery. jQuery(“*”) cheap jerseys Selects all the elemtns in DOM, returns array of jQuery objects. jQuery([name|="value"]) Will select elements which has ‘name’ attribute and its value is either equal to or starts with ‘value’ followed by (-) jQuery([name*="value"]) In this case jQuery will search for elements which has ‘name’ attribute and value of that attribute contains ‘value’ in it jQuery([name="value"]) Will select elements which has ‘name’ attribute and its value is equal to ‘value’ jQuery(“.class”) Will select all the elements with ‘class’ class. jQuery(“ancestor descendant”) One of the most cheap nfl jerseys powerful and useful selectors amongst all. This selects elements considering the specified hierarchy for e.g : jQuery(‘div label span’); will find all the ‘span’ elements that are in the specified hierarchy i.e. all the span elements that have label as their immediate parent and that label has a div as its immediate parent. This selector generally helps conflict less DOM element selection. Here is a link for your reference:  http://api.jquery.com/category/selectors/

    Tags : jquery selectors
    Categories : JQuery
    About The Author
    Aakash Budholia
    NCode Technologies, Inc. is one of the leading web design and development companies in India having immense experience in providing web and mobile app solutions.
    Comments
    No comments yet to be display
    Leave a Reply

    Your email address will not be published. Required fields are marked *