The o shortcut


#1

I'm not sure what is wrong. It keeps returning the same error: 'it isn't opening the menu'
what is wrong? :rage:

var main = function() {
$('.article').click(function() {
$('.article').removeClass('current');
$('.description').hide();
$(this).addClass('current');
$(this).children('.description').show();
});

$(document).keypress(function(event) {
if(event.which === 111) {
$('.current').children('.description').toggle();
}

please help :grin:


#2

Hi Palkiaman,

At the end of your code, you need to close the $(document).keypress(...); bit, and then close your main function. After that, you need to call main on $(document).ready();.


#3

2 posts were split to a new topic: Need help on "The O Shortcut"


#4

A post was merged into an existing topic: Need help on "The O Shortcut"