This file contains hidden or 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
// Released under MIT license: http://www.opensource.org/licenses/mit-license.php | |
$('[placeholder]').focus(function() { | |
var input = $(this); | |
if (input.val() == input.attr('placeholder')) { | |
input.val(''); | |
input.removeClass('placeholder'); | |
} | |
}).blur(function() { | |
var input = $(this); |
This file contains hidden or 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
input:disabled { | |
/*修正input disabled樣式*/ | |
color: #666; | |
background: #ddc; | |
text-shadow: 1px 1px #FFF; | |
} |
This file contains hidden or 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
function checkBarcode(code){ | |
var result = false; | |
if(code.length >= 12 && code.length <= 13){ | |
if(code.length == 12){ | |
code = "0" + code; | |
} | |
var odd = 0, | |
even = 0; | |
for(var i in code){ | |
if(i%2 == 0){ |
This file contains hidden or 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(){ | |
$("select").on("mouseenter", function(){ | |
if($("#tooltip").length == 0){ | |
$("body").append("<div id='tooltip'></div>"); | |
} | |
$("#tooltip").text($(this).children(":selected").text()); | |
$("#tooltip").css("position", "absolute").hide(); | |
$(document).on("mousemove", function(e){ | |
$("#tooltip").fadeIn("fast").css({ | |
left: e.pageX + 9, |