Home  >  jQuery

jQuery Attribute Starts With Selector

February 26, 2013
jQuery starts with selector works in the way that all the elements which starts with given selector are chosen for a given DOM element in the stack. The properties like val or css etc can be changed.
In the above code snippet, p element has been selected. The wildcard ^ is used for starts with selector. The CSS properties are being changed. Find the complete example.
<!DOCTYPE html>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<p id="abcd">ABCD</p>
<p id="cdab">EFGH</p>




©2022 concretepage.com | Privacy Policy | Contact Us