- This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
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
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’); }
});
});
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
Yup, that’s about right. It does exactly what you tell it to do. :)
Just remove the “box” class from your contact form.
i think flat colors might be a better suit for what you are after have alook here http://flatuicolors.com/
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