I am having trouble implementing the jQuery .addClass() effect.
The script I am trying to use looks like this:
<script>
$(function(){
$('#top_right_size_large').click(function(){
$('#primary').addClass('large_content');
});
});
</script>
I've looked at the documentation and checked all of my parenthesizes but for whatever reason this doesn't add the .large_content class when the #top_right_size_large anchor is clicked. Any ideas why this wouldn't work the way I expect it to?
primaryortop_right_size_largeexists? Your code works fine: jsfiddle.net/fkling/wcTz5 so I assume your HTML is not correct or adding the class just does not change anything visually.