Skip to main content

why not skip the javascript completely?

http://jsfiddle.net/zCd9g/

EDIT: sorry that's completely unhelpful seeing as this is a javascript question. Here's a solution with some modifications to the HTML:

http://jsfiddle.net/aECMb/

$('.link').click(function(e) {
    e.preventDefault();

    var $con = $('#main-content'),
        tar = $(this).data('show');

    $con.find('.contents').fadeOut();
    $con.find(tar).fadeIn();

});

why not skip the javascript completely?

http://jsfiddle.net/zCd9g/

EDIT: sorry that's completely unhelpful seeing as this is a javascript question. Here's a solution with some modifications to the HTML:

http://jsfiddle.net/aECMb/

why not skip the javascript completely?

http://jsfiddle.net/zCd9g/

EDIT: sorry that's completely unhelpful seeing as this is a javascript question. Here's a solution with some modifications to the HTML:

http://jsfiddle.net/aECMb/

$('.link').click(function(e) {
    e.preventDefault();

    var $con = $('#main-content'),
        tar = $(this).data('show');

    $con.find('.contents').fadeOut();
    $con.find(tar).fadeIn();

});
added 172 characters in body
Source Link

why not skip the javascript completely?

http://jsfiddle.net/zCd9g/

EDIT: sorry that's completely unhelpful seeing as this is a javascript question. Here's a solution with some modifications to the HTML:

http://jsfiddle.net/aECMb/

why not skip the javascript completely?

http://jsfiddle.net/zCd9g/

why not skip the javascript completely?

http://jsfiddle.net/zCd9g/

EDIT: sorry that's completely unhelpful seeing as this is a javascript question. Here's a solution with some modifications to the HTML:

http://jsfiddle.net/aECMb/

Source Link

why not skip the javascript completely?

http://jsfiddle.net/zCd9g/