#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Posts
    13
    Rep Power
    0

    Slider and Checkbox -=[HELP]=-


    replace the [dot] with .
    http://jsfiddle[dot]net/RwH5A/42/
    here is my jsfiddle code, what i want to accomplish is get the checkbox act like a radio button
    this is my code for the uncheck

    $('#check1').click(function()
    {
    $('#check2').prop('checked', false); $('#check3').prop('checked', false);
    });
    $('#check2').click(function()
    { $('#check1').prop('checked', false); $('#check3').prop('checked', false);
    });
    $('#check3').click(function()
    { $('#check1').prop('checked', false); $('#check2').prop('checked', false);
    });

    but the #price is keep on increasing with the value of the checkbox when check
  2. #2
  3. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,127
    Rep Power
    4304
    Welcome to DevShed Forums, peggy023.

    Would you mind explaining why you want to do that? Why reinvent the wheel?
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Posts
    13
    Rep Power
    0
    Originally Posted by Kravvitz
    Welcome to DevShed Forums, peggy023.

    Would you mind explaining why you want to do that? Why reinvent the wheel?
    Thanks Kravvitz!,

    I don't actually get what your asking , but what i want to create is a form like the form here www[dot]myclean[dot]com
    .,I think there's 4 step in that form and im actually just in the 1st one .
  6. #4
  7. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,127
    Rep Power
    4304
    Oh. Just because someone else disregards UI conventions does not mean it's a good idea to do so. Just use radio buttons.

    Anyway to explain why it's not working as expected, I expect the problem is that the checkboxes are being counted as checked before the click handler that allows only one at a time to be checked is executed.
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Posts
    13
    Rep Power
    0
    I just want to copy the form as it is ..
    Can you give me an example?

IMN logo majestic logo threadwatch logo seochat tools logo