eigene Selektoren erstellen wie hier
$.extend( $.expr[":"], { hottie: ("jQuery( a ).attr( 'rel' ) == 'girl' && " + "jQuery( a ).attr( 'hotness' ) >= 9") }); function FindHotties() { $("ol a:hottie").css("font-weight", "bold"); }
// ASK GOOGLE FOR COUNTRY'S SHORT_NAME if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { $.getJSON('http://maps.googleapis.com/maps/api/geocode/json', { latlng: position.coords.latitude + ',' + position.coords.longitude, sensor: false, type: 'JSON' }, function(result) { var countryKey = result.results[0].address_components[5].short_name; console.log(countryKey); alert('ITs AMAZING! LOOK AT THIS = ' + countryKey); }); }); }
$.ajax({ dataType: "json", type: "post", url: "file.php", data: "id=5&BigBoobies=true", success: function(data) { // SQUEEZE OUT DATA console.log(data); } });
$("#idForm").submit(function() { var uri = "index.php"; $.ajax({ type: "POST", url: uri, data: $("#form").serialize(), success: function(data) { alert(data); } }); return false; // avoid to execute the actual submit of the form. });