I'm trying to get a script to work, I got it working in a JSFiddle. I keep getting a TypeError and I'm not sure what's going on. The script is below.
Yes, jQuery and jQuery noConflict are being loaded before this.
jQuery(".icon").onclick(
function(){
var tab = jQuery(this).attr("data-tab");
if( jQuery(".visible").attr("data-tab") != tab ){
jQuery(".visible").removeClass("visible");
}
jQuery(".content[data-tab='" + tab + "']").toggleClass("visible");
}