* [MO] : blocknewsletter improvements
This commit is contained in:
1 parent
1e10dab8f8
commit
dab86dffe1
1 file changed
+15
-13
@@ -44,20 +44,22 @@
|
|||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var placeholder = "{l s='your e-mail' mod='blocknewsletter' js=1}";
|
var placeholder = "{l s='your e-mail' mod='blocknewsletter' js=1}";
|
||||||
{literal}
|
$(document).ready(function() {ldelim}
|
||||||
$(document).ready(function() {
|
$('#newsletter-input').on({ldelim}
|
||||||
$('#newsletter-input').on({
|
focus: function() {ldelim}
|
||||||
focus: function() {
|
if ($(this).val() == placeholder) {ldelim}
|
||||||
if ($(this).val() == placeholder) {
|
|
||||||
$(this).val('');
|
$(this).val('');
|
||||||
}
|
{rdelim}
|
||||||
},
|
{rdelim},
|
||||||
blur: function() {
|
blur: function() {ldelim}
|
||||||
if ($(this).val() == '') {
|
if ($(this).val() == '') {ldelim}
|
||||||
$(this).val(placeholder);
|
$(this).val(placeholder);
|
||||||
}
|
{rdelim}
|
||||||
}
|
{rdelim}
|
||||||
});
|
{rdelim});
|
||||||
|
|
||||||
|
{if isset($msg)}
|
||||||
|
$('#columns').before('<div class="clearfix"></div><p class="{if $nw_error}warning{else}success{/if}">{l s="Newsletter:" js=1 mod="blocknewsletter"} {$msg}</p>');
|
||||||
|
{/if}
|
||||||
});
|
});
|
||||||
{/literal}
|
|
||||||
</script>
|
</script>
|
||||||
Reference in new issue
Block a user