Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
84
rated 0 times [  89] [ 5]  / answers: 1 / hits: 32541  / 11 Years ago, wed, may 22, 2013, 12:00:00

i have index html page in my site, its the main page.
in the index html i have a button and by clicking it i want to open a popup form, i have the js file and css file of this popup included in the index html.



i just cant open this animated popup by clicking the input type button..
can anyone help me?



the clouds js:

$(function ()
{
// Register Smart skin.
$.speedoPopup.registerSmartSkin('clouds', function (overlay, container)
{
// We don't want to brake anything if there is no overlay.
if (!overlay)
{
return ;
}

if ($.speedoPopup.browser_ie && $.speedoPopup.browser_ie< 9)
{
return;
}

var clouds = '<div class=cloud x1></div><div class=cloud x2></div><div class=cloud x3></div><div class=cloud x4></div><div class=cloud x5></div>';

overlay.append(clouds);
});
});


index html: below the head tag



<link type='text/css' href='clouds/clouds.css' rel='stylesheet' media='screen' />
<script type='text/javascript' src='clouds/clouds.js'></script>


and the button:



<div>
<input type='button' name='clouds' value='Clouds'/>
</div>

More From » jquery

 Answers
35

You have to invoke the dialog on click



Lets give you button an id



<div>
<input id=btnDialog type='button' name='clouds' value='Clouds'/>
</div>


Now create a div that you want to show in dialog



<div  id=divContentToPopup>
...content here...
</div>


now you have to hook a click event on it



$('#btnDialog').click(function ()
{
$(this).speedoPopup(
{
width:550,
height:265,
useFrame: TRUE,
href: '#divContentToPopup'
});
});

[#78089] Monday, May 20, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ravenl

Total Points: 338
Total Questions: 107
Total Answers: 112

Location: Belize
Member since Mon, Jun 20, 2022
2 Years ago
ravenl questions
Thu, Feb 18, 21, 00:00, 3 Years ago
Tue, Jan 12, 21, 00:00, 3 Years ago
Tue, Mar 17, 20, 00:00, 4 Years ago
;