is there a better way to write this simple on click script?
as you can she there is a consistent number in each block. instead of duplicating it another 10 times for 10 different list item, is there a better way?
the content is not in a child of the li. so i cant club all of them with (this)
heres the thing im working on:
$( '.artist_li1' ).click(function() {
$( '.artist_content' ).removeClass( "active" );
$( '.artist_content1' ).addClass( "active" );
});
$( '.artist_li2' ).click(function() {
$( '.artist_content' ).removeClass( "active" );
$( '.artist_content2' ).addClass( "active" );
});
$( '.artist_li3' ).click(function() {
$( '.artist_content' ).removeClass( "active" );
$( '.artist_content3' ).addClass.addClass( "active" );
});
and so on....