AudithSoftworks / Uniform

A jQuery plugin to make your form controls look how you want them to. Now with HTML-5 attributes!
http://opensource.imanov.net/uniform/
MIT License
2.2k stars 336 forks source link

Select box preventdefault first click #450

Closed kiredewit closed 6 years ago

kiredewit commented 6 years ago

How to prevent defaults on a select box created with uniform?

Normally I do: $(".update").click(function(e){ e.preventDefault(); console.log($("#is_vehicle_active").prop('checked')); }

In combination with uniform, this is not working on the normal way. First click its ignoring preventdefault. After the first click its working again.

I don`t know the correct way to use preventdefault with uniform. Does someone know how to fix this?

kiredewit commented 6 years ago

answer: https://jsfiddle.net/Shehi/2m0Lza8L/