We've got a sweet solution that uploads an image with AJAX and then immediately displays.
Ajax ,an acronym for Asynchronous Javascript and Xml is a group of interrelated web development techniques used on the client side to create asynchronous web applications.With Ajax, web applications can send data to, and retrieve data from, a server asynchronously (in the background) without interfering with the display and behavior of the existing page.
Here we are usingajaxupload.js to upload an image and show upload button on mouse hover and mouse out same like facebook.
Screen 1
On Mouse hover show upload button
Screen 2
Choose image file
Screen 3
Finally Preview of image without postback (without refreshing page)
Screen 4
JS :
You need this following javascript file to perform AJAX Image Upload they are following:
Here i am showing you how to create your own style tooltip in jquery. Its very simple to create different type of tooltip by changing it design style.
Screen 1
Here we are calling a jquery function on hover of div and call another function after hover out to hide that div. We are using two event to call jquery function:
onmouseover
onmouseout
OnMouseOver - The onmouseover event fires when the mouse pointer go to the boundaries of the target object.
OnMouseOut - The onmouseout event fires when the mouse pointer leaves the boundaries of the target object.
<div align="center"> <h1 style="font-family: Arial; margin-bottom: 80px;"> Tooltip On div Hover using onmouseover and onmouseout events</h1> //Calling function onmouseover and onmouseout // HoverDetails is the function which we need to pass current div id and message that you want to display in tooltip <div class="QuestionImg" id="divRoleDetails" onmouseover="HoverDetails(this.id,'Lorem ipsum dolor sit amet, cons ectet uer adipiscing elit. Lorem ipsum dolor sit amet, co nsect tuer adipiscing elit.');" onmouseout="HideHoverDetails();" style="background-color: rgb(152, 0, 0); height: 30px; padding-top: 10px; width: 150px; text-align: center; cursor:pointer; font-family: Arial; color: White;"> Hover Me </div> //Hover Details div <div id="divHoverDetails" class="hoverContiner"> <div class="hoverDivSyle"> </div> <div id="divHoverDetailsText" class="hoverTextStyle"> </div> </div>