What I need to do is set a radio button as checked based on it's child, an anchor tag, more specifically its HREF property (the HREF should be a HASH). The first stanza of code is what I've been going off of to find a solution for the part I'm struggling with.
$('article').each(function(){
var that = $(this);
that[ that.find('a').attr( 'href' ) === hash ? 'addClass' : 'removeClass' ]( 'vis' );
});
The bad code:
$('input').(function(){
var that = $(this);
that[ that.find('a').attr( 'href' ) === hash ? 'checked'; ]( 'checked' );
});
What the code is suppose to do, is after someone clicks a link (the link being a hash), the script will detect the hash change, and check a radio button based upon the hash, upon doing so, I have CSS3 code that I've made and tested, that will slide content out of view, and different content into view.