Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function(){
- var zipCodes =[60538,60504,75001,76008,75002,75013,76009,76225,75409,76226,76001,76002,76006,76010,
- 76011,76012,76013,76014,76015,76016,76017,76018,76227,76020,75413,75180,75101,76021,
- 76022,75414,76126,75424,75418,76023,76028,75135,75006,75007,75010,76127,75104,75423,
- 75009,75105,76031,75211,76034,76233,75121,75019,75114,76035,76036,];
- $("#buttontest").click(function(){
- var zipIndex = zipCodes.indexOf(parseInt($("#full_day").val()));
- $("#zipMessage > div").hide("fast");
- var zipId = zipIndex > -1 ? zipCodes[zipIndex] : "Error";
- $("#zip"+zipId).show("fast");
- });
- $("#full_day").keydown(function(e){
- if(e.which === 13){
- $("#buttontest").click();
- }
- });
- });
- $("#some_button").on('click', function(e) {
- $.ajax({
- type: 'POST',
- url: 'some_php_script.php',
- data: {foo : "bar"}
- })
- .done(function(results) {
- // check to see if results is actually html
- // going to assume it is for the sake of example
- $("#zip60538").html(results);
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement