Reputation: 326
i am using uniform js for changing the background images of checkbox, radio buttons, select box. For this i include jquery file, uniform library js file and another thing is a function of uniform js for initializing the function as
$(function(){
$("input, select, textarea, button").uniform();
});
Here i got one issue, i want to clear this function at the specific portion of the content where i do not want uniform function. then what procedure do i adopt for solving my problem?
I do not have jsfiddle code for this code. If you need it i will let you know.
Upvotes: 4
Views: 10937
Reputation: 21
According to Prestashop 1.6.x there is already omitting uniform implemented in default theme:
.\themes\default-bootstrap\js\global.js
with using class .not_uniform
$("select.form-control,input[type='radio'],input[type='checkbox']").not(".not_uniform").uniform();
Upvotes: 1
Reputation: 78006
Just use the .not() function and set a class on items that you wish to omit the uniform()
logic.
DOM:
<!-- This gets it -->
<select>
<option>Foo</option>
</select>
<!-- This doesn't -->
<select class="noUniform">
<option>Bar</option>
</select>
JS:
$(function(){
$("input, select, textarea, button").not('.noUniform').uniform();
});
Upvotes: 10