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.

    $(".cb").click(function(){
        $('.cb').css({'outline-color':'none','outline-style':'none','outline-width':'none'});
    });
    

    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(){
        $('.cb').css({'outline-color':'none','outline-style':'none','outline-
    width':'none'});
    });
    

    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
    Mfffffffffffff

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

    خبرنامه

    عضویت

    نام کاربري :
    رمز عبور :