I have the following code:
$(":input[type='text']").wijtextbox();
What I would like is for the wijtextbox() NOT to be applied if the class of my textbox is native. Is there a way I can somehow exclude this by adding to the above selector?
Make this a wijtextbox:
<textarea class="wijmo-wijtextbox ui-widget ui-state-default ui-corner-all valid" >xx</textarea>
Don't make this a wijtextbox:
<textarea class="native wijmo-wijtextbox ui-widget ui-state-default ui-corner-all valid" >xx</textarea>
This:
$("input[type='text']").not(".native").wijtextbox();
or this:
$("input[type='text']:not('.native')").wijtextbox();
should do the trick. There's also a shortcut for selecting an input whose type is text
:
$("input:text").not(".native").wijtextbox();
More on not()
here.
EDIT: Since it appears you need to select a textarea, try the following:
$("textarea").not(".native").wijtextbox();
Try this.
$(":input:not(.native)").wijtextbox();
Since you selecting textarea
you can even use this
$("textarea:not(.native)").wijtextbox();
:not(selector)
- Selects all elements that do not match the given selector.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With