input on submit popup lightbox with jQuery
I need a functionality for my newsletter signup:
When user presses enter there should be a lightbox that appears that says a message.
It's on a WordPress site and until now I have this:
<script src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery-1.6.min.js" type="text/javascript"></script><script type="text/javascript">$(document).ready(function() {$("li:has(ul)").addClass("parent");$('.sub-menu li:first-child').addClass("firstchild");}</script>
Obviously I've used jQuery also for other purposes.
The newsletter form:
<form id="newsletterform"><input type="text" cla开发者_运维知识库ss="input" name="email" value="Subscribe to our newsletter" onfocus="if (this.value=='Subscribe to our newsletter') this.value = ''" onblur="this.value=this.value==''?'Subscribe to our newsletter':this.value;"><input type="submit" class="submit"></form>
Curious question:
How can I solve my problem?
Magical word: PLEASE :)
Thank you.
P.S.: Any other idea/solution? Input form whith jQuery action on submit and implemented in WordPress files.
Jquery ui dialog will come in handy for you. See this blog to understand how to use the jquery ui dialog. Lightbox goes only with images...
精彩评论