JQuery Mobile skip specific element
Is there a way to tell jquery mobile to skip a specific element?
I have a custom div that looks like:
<div class="fr-confRoomInfo">
<a href="#" class="fr-confRoomBtn blue ui-link">
<span>Some text</span></a>
</div>
I dont want to apply the ui-link to the tag in that specific div. Is there any way to do that?
EDIT I ended up moving my c开发者_如何转开发ustom css link below the jquery mobile so I could just override the css parameters that I needed to change. So in my css i ended up doing this:
.fr-confRoomInfo
{
text-shadow: none;
}
Which got rid of the text-shadow that was actually inherited from ui-body-c (not ui-link)
data-role="none" is the right thing to tell jQuery Mobile to ignore your tag
You could try .not()
:
$('a').not('.fr-confRoomInfo > a').addClass('ui-link');
or you could just add it to everything, and remove it from the one you want excluded:
$('a').addClass('ui-link');
$('.fr-confRoomInfo > a').removeClass('ui-link');
EDIT given your comment about ui-link
always being added, just try the last line of the second snippet above.
精彩评论