Home > UI/UX Development (Page 9)

Event bubbling and capturing in Javascript

Event bubbling and event capturing are two ways of event propagation in DOM structure.Ex. There are two HTML elements embedded in one another as:Event bubbling: the event is captured in span element first and then in div.Event Capturing: the event is captured in div element first and then in span.Browser Support: In older

This Article is TAGGED in , . Read more

CSS Scrollbar

Many times we need to change the way browsers render scrollbars, although we don’t find enough browsers that support it( :( ) not even vendor-prefixed properties except for Webkit.Webkit supports styling your scrollbar as required, and yes this means you could only view these custom scrollbars in Safari and Chrome

This Article is TAGGED in , . Read more

CSS Box model comparison in IE and FF

What is the box model?A HTML element is rendered as a rectangle box. The box has attributes viz. width, padding, height, margin and border.The HTML element is rendered differently in different browsers.For example:[crayon-680a4dd3ed63b547841730/]Guess the computed width of the div.60em80emBoth are correct answers. How?IE: Trident (layout engine for IE) renders the

This Article is TAGGED in , , . Read more

How to add pin on page load and move it anywhere on Google map using JavaScript

Demo: PinOnMap Here is the source code to show pin on Google map using JavaScript: <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript"> [crayon-680a4dd3ed830901434638/] </script> // html code <body onload="initialize(new google.maps.LatLng(18.5203,73.8567))" style="font-family: Arial; border: 0 none;"> <input type="text" size="52" name="address" id="Address" />

This Article is TAGGED in , , . Read more

How to do Image preview before upload using jQuery

Demo: ImagePreview Here is the source code for image preview before upload using jQuery: <script src="http://mundrisoft.com/js/jquery.min.js"></script> <script type="text/javascript"> [crayon-680a4dd3ed950079988116/] </script> [crayon-680a4dd3ed954358504529/] Please drop comment if you have any question :)

This Article is TAGGED in , . Read more