Category: HTML

HTML Jquery & Javascript

Submit a form using javascript

We can submit a form using its name, id, class and tag <form id=”form” name=”form1″ class=”form”> </form> Suppose forms name is “form1”, then we can submit the form with jquery as below: $(“form[name=’form1′]”).submit();

HTML Jquery & Javascript

How to make page scroll position to top at page refresh in HTML

$(document).ready(function(){ $(‘html’).animate({scrollTop:0}, 1); $(‘body’).animate({scrollTop:0}, 1); });

HTML Jquery & Javascript

Include Google malayalam typing in typing

Include below code in header section ===================================== <script type=”text/javascript” src=”http://www.google.com/jsapi”></script> <link href=”http://www.google.com/uds/modules/elements/transliteration/api.css” type=”text/css” rel=”stylesheet”/> <script type=”text/javascript”> google.load(“elements”, “1”, {packages: “transliteration” }); var transliterationControl; function onLoad() { var options = { sourceLanguage: google.elements.transliteration.LanguageCode.ENGLISH, destinationLanguage: google.elements.transliteration.LanguageCode.MALAYALAM, transliterationEnabled: true, shortcutKey: ‘ctrl+g’ }; transliterationControl = new google.elements.transliteration.TransliterationControl(options); var ids = [“cmtx_comment”,”cmtx_name”]; transliterationControl.makeTransliteratable(ids); transliterationControl.addEventListener( google.elements.transliteration.TransliterationControl.EventType.STATE_CHANGED, transliterateStateChangeHandler); transliterationControl.addEventListener( google.elements.transliteration.TransliterationControl.EventType.SERVER_UNREACHABLE, serverUnreachableHandler); transliterationControl.addEventListener(…

HTML

How to remove iframe scrolls

Usually we need to specify the height of iframe. if content exceeds this height scrolls will be present in it. To remove this scrolls use jquery mentioned in the below link: Link : http://davidjbradshaw.github.io/iframe-resizer/

HTML

How to add ‘required’ field to radio buttons

Add ‘required’ to any of the radio group elements: <input type=”radio” name=”acces” value=”all” required>All</input> <input type=”radio” name=”acces” value=”mobile”>Mobile</input> <input type=”radio” name=”acces” value=”desktop”>desktop</input>

HTML Jquery & Javascript

Auto-sliding not working after clicking the controls in bxslider

Add “onSlideAfter” parameter in bxslider options: var slider = $(‘.bxslider’).bxSlider({ auto: true, pager: false, autoHover: true, autoControls: true, onSlideAfter: function() { slider.stopAuto(); slider.startAuto(); } });

HTML Jquery & Javascript

Social media icons in a pop up box

Social media icon as pop up box in html, visit below link: http://js-socials.com/start-using/

HTML

Disable right click in websites

In body tag add below code: oncontextmenu=”return false;” Eg: <body oncontextmenu=”return false;”>

css HTML Jquery & Javascript

Adding page pre loader image in websites while loading

code =========================== <div id=”site-loader” class=”load-complete”> <div class=”load-position”> <div class=”logo”><img src=”Image url” alt=”Title”/></div>            // Provide Image url  and title here <h6><?php _e( ‘Please wait, loading…’, “Title” ); ?></h6> <div class=”loading”> <div class=”loading-line”></div> <div class=”loading-break loading-dot-1″></div> <div class=”loading-break loading-dot-2″></div> <div class=”loading-break loading-dot-3″></div> </div> </div> </div> style ================================ .load-complete { position: fixed; overflow: hidden; background: #fff;…

HTML

How to make a link downloadable in html

<a href=”your link here’” download>Download</a> add keyword download in a tag