javascript - Different style of opening popup window -


I display a popup window in a simple format. I want to apply different formats to open a window popup. How can I apply the format or style so that it will look great when opening a pop window? The following is my source code:

  & lt; Div onMouseOver = "show ('therapy')" onMouseOut = "hide ('therapy')" & gt; & Lt; Div id = "healing" class = "bgdiv" & gt; & Lt; Div id = "title" category = "title" & gt; Healing & lt; / Div & gt; & Lt; Img class = "img" src = "picture / healing.bmp" & gt; & Lt; Div class = "description" & gt; Welcome sir & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt;   

JavaScript code

  & lt; Script language = "javascript" & gt; Function show (id) {document.getElementById (id). Style Visibility = "visible"; } & Lt; / Script & gt;    

You should take a look at JQuery (http://jquery.com/) . JQuery is a Javascript framework and you can use effects to display elements like Fade, Slide, Show / Hide.

All you have to do is change your code a bit (jacuzzi solution):

  & lt; Div id = "show" & gt; & Lt; Div id = "healing" class = "bgdiv" & gt; & Lt; Div id = "title" category = "title" & gt; Healing & lt; / Div & gt; & Lt; Img class = "img" src = "picture / healing.bmp" & gt; & Lt; Div class = "description" & gt; You are welcome. & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Script & gt; $ ('#ShowHeeling'). Hover (function () ($ ('#haling'). Show (500)}, function () {$ ('# healing'). Hide (500)}); & Lt; / Script & gt;   

Even when you use the JQuery UI (even if it is an extension for JQuery) you have a lot of impact (take a look here).

To use the effect of the jQuery UI, you need to update your script like this:

  & lt; Script & gt; Show ("Explode", {}, 500);}, Function () {$ ('#Helching'). (Hide ($ '' "explosion", {}, 500)}) ;; & Lt; / Script & gt;    

Comments