makata Posted February 22, 2014 Share Posted February 22, 2014 The following line does not work. $("label[for=pick] .ui-btn-text").html("new label"); JS Bin - Collaborative JavaScript Debugging How to correct this? Link to comment Share on other sites More sharing options...
dsonesuk Posted February 22, 2014 Share Posted February 22, 2014 The element does not have a class name of 'ui-btn-text' also having space between "label[for=pick]" and "ui-btn-text" means it will try to target a child element, i think the main problem is it wouldn't be able to see the class anyway, as it does not exist when triggered $("label[for=pick]").html("new text"); should work fine, as the selector is seen in both cases. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now