Created
August 21, 2012 14:44
-
-
Save jbubriski/3416172 to your computer and use it in GitHub Desktop.
jQuery buttons?
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(){ | |
var aInputs = $(":button"); | |
for(var i=0;i<aInputs.length;i++){ | |
var obj = $(aInputs[i]); | |
if(obj.hasClass("vhm_btn_xsmall") || obj.hasClass("vhm_btn_small") || obj.hasClass("vhm_btn_medium") || obj.hasClass("vhm_btn_large")){ | |
obj.mousedown(function(){ | |
var o = $(this); | |
var sClass = o.attr("class").toLowerCase(); | |
o.removeClass(sClass); | |
o.addClass(sClass + "_on"); | |
}); | |
obj.mouseup(function(){ | |
var o = $(this); | |
var sClass = o.attr("class").toLowerCase(); | |
o.removeClass(sClass); | |
o.addClass(sClass.replace("_on","")); | |
}); | |
} | |
}; | |
var aInputs = $(":submit"); | |
for(var i=0;i<aInputs.length;i++){ | |
var obj = $(aInputs[i]); | |
if(obj.hasClass("vhm_btn_xsmall") || obj.hasClass("vhm_btn_small") || obj.hasClass("vhm_btn_medium") || obj.hasClass("vhm_btn_large")){ | |
obj.mousedown(function(){ | |
var o = $(this); | |
var sClass = o.attr("class").toLowerCase(); | |
o.removeClass(sClass); | |
o.addClass(sClass + "_on"); | |
}); | |
obj.mouseup(function(){ | |
var o = $(this); | |
var sClass = o.attr("class").toLowerCase(); | |
o.removeClass(sClass); | |
o.addClass(sClass.replace("_on","")); | |
}); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I keep reloading the page to see if this has been fixed but ITS STILL HERE!!!!