Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var main=function() {
- $('.article').click(function() {
- $(this).addClass('current');
- $(this).children('.description').show();
- });
- $(document).keypress(function(event) {
- if (event.which === 110) {
- var currentArticle = $('.current');
- var nextArticle = currentArticle.next();
- currentArticle.removeClass('current');
- nextArticle.addClass('current');
- }
- });
- };
- $(document).ready(main);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement