Skip to content

Instantly share code, notes, and snippets.

@ahornerr
Created February 15, 2013 20:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahornerr/4963305 to your computer and use it in GitHub Desktop.
Save ahornerr/4963305 to your computer and use it in GitHub Desktop.
$(document).ready(function(){
$(".send").on('click', function() {
//Test if the section contains a number, becaose of 115A, etc
if (isNaN($('.section').val())) {
var section = $('.section').val(); //Contains numbers
} else {
var section = parseInt($('.section').val(), 10); //Radux 10
}
var row = $('.row').val();
var seat = parseInt($('.seat').val(), 10); //Radux 10
console.log(section + "," + row + "," + seat);
var val = fetch_seat(section,row,seat);
console.log(val);
var leftpx = (val.x * $('.fuckandy').width())+"px";
var toppx = (val.y * $('.fuckandy').height())+"px";
console.log('left: ' + leftpx + ' toppx:' + toppx);
$(".pointer").css("left", leftpx);
$(".pointer").css("top", toppx);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment