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
lat1 = $(this).attr('lat'); | |
lng1 = $(this).attr('lng'); | |
latLng1 = new google.maps.LatLng(lat1, lng1, true); |
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
$array = array( | |
'multi' => array( | |
'foo' => -5 | |
) | |
); |
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
<?php | |
function replace($string){ | |
substr_replace($string, 'aaaa', 5, 8); | |
} | |
$str = 'abcdefghijklmnopqrstuvwxyz'; | |
replace($str); | |
echo $str; // returns: abcdefghijklmnopqrstuvwxyz | |
?> |
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
{ | |
"location": "Santa Monica | |
" | |
} |
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
<html> | |
<head> | |
<style> | |
#main{ | |
border: 1px solid #000; | |
width:800px; | |
margin-left:auto; | |
margin-right:auto; | |
} | |
.long{ |
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
<!-- | |
Description: This is just a testing file... | |
--> | |
<html> | |
<head> | |
<script src='jquery.js'></script> | |
<script> | |
$(document).ready(function(){ | |
$('#input').click(function(){ | |
console.log('a'); |
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
var dataString = 'name='+ name + '&spectator=' + spectator; | |
$.ajax({ | |
type: "POST", | |
url: "/php/login.php", | |
data: dataString, | |
success: function() { | |
$('#login_form').html(""); | |
$('#controls2').html("") | |
.fadeIn(1500, function() { | |
var refreshId = setInterval(function() { |
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
<html> | |
<head> | |
<script src='jquery.js'></script> | |
<script> | |
$(document).ready(function(){ | |
// When hovered | |
$('#leftTab').on('mouseenter', '.starImg', function(){ | |
console.log('asdasd'); | |
this.src = 'images/stardown.png'; |
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
$.ajax({ | |
url: "somefile.php" | |
}).done(function(result){ | |
firstArray = result.split('~'); | |
var secondArray = []; | |
$.each(firstArray, function(index, value){ | |
secondArray[index] = decodeURIComponent(value); | |
var secondArray2 = $.parseJSON(secondArray[index]); | |
console.log(secondArray2.user); | |
}); |
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
$('#search').click(function(){ | |
$.ajax({ | |
url: "search.php", | |
}).done(function(result){ | |
$('#results').replaceWith('<div class="someclass">sometext</div>'); | |
$('.ad').bind('click'); | |
}); | |
}); | |
$('.someclass').on('click', function(){ |