Created
February 7, 2017 10:14
-
-
Save opalfroot/03a416fc89019f5c83a58339d036e3a9 to your computer and use it in GitHub Desktop.
Simple jQuery tab function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
(function( $ ){ | |
$.fn.tabs = function(selector, targetid) { | |
$(selector).each(function(){ | |
if($(this).attr("id")!=targetid){ | |
this.style.display = "none" | |
}else{ | |
$(this).fadeIn(500) | |
} | |
}) | |
return this; | |
}; | |
})( jQuery ); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment