#19 JAVASCRIPT ALERTS
jAlert example
JALERT is a useful library which can be used to replace the three boring system kinds of popup boxes: Alert box, Confirm box, and Prompt box.
The usual system JavaScript alert would be called like below:
alert("I am an alert box!");
Jalert can be used in the same way but with more functionality:
$ ( "#confirm_button" ) . click ( function ( ) {
jConfirm ( 'Can you confirm this?' , 'Confirmation Dialog' , function ( r ) {
jAlert ( 'Confirmed: ' + r , 'Confirmation Results' ) ;
} ) ;
} ) ;
#12 SIMPLE ANIMATIONS IN CSS
CSS animations
The following is a few examples of web loading animations made entirely in HTML and CSS . jQuery is used to add and remove the CSS animations. For example once the document has loaded a jQuery click event can be triggered like so:
jQuery used to call animations
< strong > & nbsp ; jQuery ( document ) . ready ( function & nbsp ; ( $ { $ ( '#pulse' ) . click ( function ( { & nbsp ; & nbsp ; & nbsp ; & nbsp ; & nbsp ; & nbsp ; $ ( '.placeholder' ) . removeClass ( 'wave' ) . addClass ( 'pulse' ) ; & nbsp ; } ) } ) ; < / strong >
index.php
shows a variety of different shapes combined. The following 3 small scripts show their respective shapes. anim.css
holds all the animations.
HTML: Hyper Text Markup Language
CSS: Cascading Style Sheets
jQuery: lightweight JavaScript library
Folder structure.
Passionate about technology!