Disable New Line in Textarea when Pressed ENTER

Disable New Line in Textarea when Pressed ENTER Disable New Line in Textarea when Pressed ENTER <script> $(document).ready(function(){ $(“textarea”).keydown(function(e){ if (e.keyCode == 13 && !e.shiftKey) { // prevent default behavior e.preventDefault(); //alert(“ok”); return false; } }); }); </script> READ MORE ARTICLES. Blogspot Articles

jQuery toggling without using toggle

jQuery toggling without using toggle //set initial status $(‘element’).data(‘status’,’not_clicked’); $(‘element’).click(function(){ if( $(this).data(‘status’) == ‘clicked’ ) { $(this).data(‘status’,’not_clicked’); //your code in case of second click } else { $(this).data(‘status’,’clicked’); //your code in case of first click } }); jQuery toggling without using toggle What it does: Sets the initial status – not_clicked In case of a […]

How to make scroll to top ?

Scroll to top Scroll to top WordPress Amitpal Singh 1, Place the javascript code inside head tag: [html] <script type="text/javascript"> $(document).ready(function(){ $(window).scroll(function(){ if ($(this).scrollTop() > 100) { $(‘.scrollup’).fadeIn(); } else { $(‘.scrollup’).fadeOut(); } }); $(‘.scrollup’).click(function(){ $("html, body").animate({ scrollTop: 0 }, 600); return false; }); }); </script> [/html] 2, Place the style code in css file: […]

Bitnami