Last active
August 29, 2015 14:19
-
-
Save IanRamosC/693969dc274233d1ac39 to your computer and use it in GitHub Desktop.
workaround
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
var tab = jQuery('.tabs .tab-title a'); | |
var uriBase = document.baseURI; | |
jQuery('.tabs .tab-title a img').first().attr('src', jQuery('.tabs .tab-title a img').first().attr('src').replace('_off', '_on')); | |
tab.mousedown(function(){ | |
var allImgs = jQuery('.tabs .tab-title a img'); | |
allImgs.each(function() { | |
jQuery(this).attr('src', jQuery(this).attr('src').replace('_on', '_off')); | |
}); | |
var classe = jQuery(this).attr('class'); | |
var newSrc = uriBase + 'wp-content/themes/proudmoore/assets/img/tabs-icon/' + classe + '_on.png'; | |
jQuery(this).find('img').attr('src', newSrc); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment