Fancybox currently does not directly support a way to automatically launch. The work around I was able to get working is creating a hidden anchor tag and triggering it’s onclick event. Make sure your call to trigger the onclick event is included after the jquery and fancybox js files are included. The code I used [...]
Decode HTML entities with jQuery
Decoding HTML entities can be so easy with jQuery. The following code snippet converts all HTML entities to their applicable characters:
Javascript: isArray Function
This is a little tutorial of how to check a variable to know if it’s an array in JavaScript. Unfortunately there’s no built-in “isArray” function like there is with other languages (such as php is_array). And, to make matters worse, strings are really arrays of characters. So checking value[0] can give you a valid value [...]
jQuery: Animated Scroll to Top
The following Javascript will change all <a href=”#top”> links to scroll to the top instead of the instant jump that normally happens when the link is clicked. Note the “return false;” line. This is required otherwise the default action will be done and the instant scroll will happen instead of the nice animated scrolling effect.
JQuery Version abfragen
Manchmal muss man die Version von JQuery kennen, mit der das Script ausgeführt wird, um z.B. versionsspezifische Funktionen zu schreiben. Das kann z.B. der Fall sein, wenn man ein JQuery Plugin erstellt, dass in unterschiedlichen Umgebungen läuft.
jQuery autocomplete
Auto-completion of search terms is an AJAX feature popularized by Google that reduces typing by listing possible keywords as the user types. This article will show you the steps of building a auto suggestion box with PHP and jQuery (No autocomplete Plugin or any other components are needed). We’re going to check what a user [...]
JQuery von Google beziehen
Jeder der jQuery schon einmal benutzt hat, kennt die Einbindung mittels <script src=”js/jquery-1.4.2.js” type=”text/javascript”></script>. Es gibt allerdings eine Möglichkeit das Framework zu nutzen ohne es lokal oder auf dem eigenen Webspace abzulagern. Nämlich über die Google AJAX Libraries API. Mit ihr lässt sich das jQuery Framework in der aktueller Version, sowie in älteren Ausgaben direkt [...]
jQuery Animations-Plugins
Da immer mehr Leute Internetseiten von iPhone und iPad besuchen und wie algeim bekannt ist, diese Geräte kein Flash unterstützen, bietet Javascript und jQuery eine gute Alternative zum erstellen von Animationen. Im folgenden eine kleine Zusammenstellung von jQuery Plugins zum erstellen von Flash ähnlichen Animationen.
jQuery Formular-Validierungs-Plugins
Für die Validierung von Formularen gibt es grundsätzlich zwei verschiedene Möglichkeiten. Entweder die Daten werden nach dem Abschicken des Formulars serverseitig überprüft/validiert oder die Daten werden vor dem Abschicken direkt beim Ausfüllen clientseitig auf korrekte Eingaben geprüft. Für das clientseitige Validieren gibt es zahlreiche JQuery-Plugins, von denen ich eine kleine Auswahlt von 10 Plugins vorstellen [...]