I have define a custom attribute called “data-children”,use as:
<div data-children=“test01 test02 test03”></div>
But how can I judge the property has “test04”:
var $collection=$('div').attr('data-children')
……//then what can I do?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Since it returns a string, you can use the match method of the string object. I would suggest using the data method, though, if possible.