Home  >  jQuery

jQuery Attribute Ends With Selector

February 25, 2013
jQuery provides API to find all those element whose attribute is ending with a given selector. It does not match with word instead it only checks expression.
<input type="button" name="abxy"/>
In the this input type, attribute name has the value abxy. So if selector will be xy then this element will be chosen by jQuery API.
To checks ends with selector, $ sign is used i.e jquery ends with wildcard is $. Find the example below.
<!DOCTYPE html>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<input type="button" name="xyd"/>
<input type="button" name="abxy"/>
<input type="button" name="axybd"/>
<input type="button" name="abxcy"/>



©2022 concretepage.com | Privacy Policy | Contact Us