Onclick to open without clicking

I think that this does a pretty job with that, your thought?

	visibility: visible;
	-webkit-animation: swingit forwards 0.5s 0.5s; /* 0.5s 0.5s = time of form swinging, delay before it happens respectively */
	-moz-animation: swingit forwards 0.5s 0.5s;
	animation: swingit forwards 0.5s 0.5s;
	-webkit-transition: visibility 0s 0.5s; /* 0s 0.5s = time of form appearing, delay before it happens respectively */
	-moz-transition: visibility 0s 0.5s;
	transition: visibility 0s 0.5s;
}

If it works for you, all good. Do you need all those browser-specific prefixes though.
Support is pretty good across the board.

Honestly, I don’t know! I found this code and I am messing around with it and it seems to work.

I am having an issue with this though. I replaced the form with a video. Tried putting a video tag and that didn’t work. So I changed form to hello, to just
try it. It works but it doesn’t swing in like it did with the form tag. It does swing in IE, not FF and Chrome.

#ddoptinbox.open .ddoptincontent .ddoptinformcontainer hello{
	visibility: visible;
	-webkit-animation: swingit forwards 0.5s 0.5s; /* 0.5s 0.5s = time of form swinging, delay before it happens respectively */
	-moz-animation: swingit forwards 0.5s 0.5s;
	animation: swingit forwards 0.5s 0.5s;
	-webkit-transition: visibility 0s 0.5s; /* 0s 0.5s = time of form appearing, delay before it happens respectively */
	-moz-transition: visibility 0s 0.5s;
	transition: visibility 0s 0.5s;
}

Hard to help without a runnable example.

I the “hello” in the selector weird though. Do you have a “hello” element in your page?

Yes, I changed the form to hello…

<div class="ddoptinformcontainer">
<hello>content</hello>

I ended up putting back the form tag. The reason it wasn’t working is that video width was too wide and by changing width made the difference.

Thanks for you assistance. I really like that onload page code over having to click on it.

I appreciate it, thanks!

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.