Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var x = 0;
- var y = 0;
- var moveMap = function (y,x){
- $.ajax({
- type: "GET",
- url: "index.php",
- data: "y="+y+"&x="+x,
- success: function (htmlCode){
- $('body').html(htmlCode);
- }
- });
- }
- $(document).ready(function(){
- $('span.left').click(
- function(){
- x++;
- moveMap(y,x);
- });
- $('span.right').click(
- function(){
- x--;
- moveMap(y,x);
- });
- init();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement