Search code examples
jqueryjsfiddlecodepen

CodePen refreshing after every run?


I'm messing around with a simple jQuery script & CodePen keeps refreshing after I click any of the links in my Pen. It's really small - here it is.

Is something in my code causing this? I tried to copy this all over to jsFiddle & it returned an error, I couldn't even run the script.

Here's the script I'm using

$(document).ready(function(){

$(".tabbed ul li a:nth-child(1)").click(function(){

  $(".slider-2").css( "display", "none" );


});
});

Solution

  • Omg, it's because I have tags, so it follows those "links". lol