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

  • مطالب مرتبط
  • Repeating for loop within a function Python 3
  • jQuery: run function on document ready load and scroll
  • Reference Error: Function is not defined.Webpack
  • creating a text adventure for school and want consequences to a prior action. it repeats the function bad instead of moving on to the good function
  • Understanding How These Functions Works?
  • Can't segue from button to UINavigationController
  • نویسنده : استخدام کار بازدید : 11 تاريخ : دوشنبه 27 شهريور 1396 ساعت: 1:53
    برچسب‌ها :