Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript everything after skills removed when selecting radio button js

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #45604
    Attila Hajzer
    Participant

    http://hajzer.info/#skills

    click one of the radio buttons and the contact form dissappears. but when you click all again the contact form re-appears.

    here’s the js

    // attack a click event on all radio buttons with name ‘category’
    $(“input[name=category]”).change(function() {
    var sel = $(this).val();
    $(‘.hide’).fadeIn(‘slow’).removeClass(‘hide’);
    if (sel !== ‘box’) { $(‘.box:not(.’ + sel + ‘)’).hide().addClass(‘hide’); }
    });
    });

    #139090
    pixelgrid
    Participant

    your contact form is inside a div with a class of box the same class you use to target your skills boxes remove the class and the code works ok

    #139091
    Senff
    Participant

    Yup, that’s about right. It does exactly what you tell it to do. :)

    Just remove the “box” class from your contact form.

    #139093
    pixelgrid
    Participant

    i think flat colors might be a better suit for what you are after have alook here http://flatuicolors.com/

    #139097
    pixelgrid
    Participant

    label whould be ideal , just make sure the ‘for’ attribute of the label is the same as the id attribute of the checkbox.

    You will need 4 different ids one for each category.

    an unordered list without radio buttons but an active class and javascript is another solution

    #139098
    Alen
    Participant
Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.