jQery function fires unexpectedly from alert OK button

تعرفه تبلیغات در سایت

آخرین مطالب

امکانات وب

Vote count: 0

I've got radio buttons with class="cb". Click any .cb button and a little function clears the outlines on the buttons. Here's the function: It works correctly.


If I also want to clear the same outlines when a regular button (i.e., not radio) is clicked, I run into trouble. The button group is class="butt". Here's the amended code:

$(".cb, .butt").click(function(){

Now the problem: If there's an alert open and the amended code exists, the function fires when the "OK" button in the alert is clicked. I've tried separate functions, tried identifying the (non-radio) buttons by their ids, etc. but no matter what the outlines on the radio buttons clear when the OK button in the alert is clicked.

Any ideas?

asked just now

نویسنده : استخدام کار بازدید : 20 تاريخ : دوشنبه 27 شهريور 1396 ساعت: 1:53

فهرست وبلاگ