User Tools

Site Tools


jquery:allgemein

This is an old revision of the document!


jQuery

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");
}

HTML5 - Detect geolocation

// 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);
		});
	});
}
jquery/allgemein.1391586642.txt.gz ยท Last modified: by admin