HTML

Go to Top

<style type=”text/css”> .go-top { position: fixed; bottom: 2em; left: 2em; text-decoration: none; color: white; background-color: rgba(0, 0, 0, 0.3); font-size: 12px; padding: 1em; display: none; } .go-top:hover { background-color: rgba(0, 0, 0, 0.6); } </style> <!– gototop –> <script type=”text/javascript”> $(document).ready(function () { $(‘[data-toggle=”offcanvas”]’).click(function () { $(‘.row-offcanvas’).toggleClass(‘active’) }); }); $(document).ready(function() { // Show or hide …

Go to Top Selengkapnya »

Select with onChange

<select onChange=”window.location.href=this.value”> <option value=”www.google.com”>A</option> <option value=”www.aol.com”>B</option> </select>

Input Number Only

<input type=”text” onKeyPress=”if(event.keyCode < 48 || event.keyCode > 57) event.returnValue = false;” name=”Handphone” id=”Handphone”>

Auto Complete Search

<?php $cars = array(“facebook”, “google”); ?> <link rel=”stylesheet” href=”http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css”> <script src=”http://code.jquery.com/jquery-1.10.2.js”></script> <script src=”http://code.jquery.com/ui/1.11.4/jquery-ui.js”></script> <form id=”frm” method=”post”> <input id=”cartag” type=”text” name=”car”> </form> <script> $(function() { var availableTags = <?php echo json_encode($cars); ?>; $( “#cartag” ).autocomplete({ source: availableTags, select: function (e, ui) { if(ui.item.value==’facebook’){ window.location.href = “http://facebook.com”; } else if (ui.item.value==’google’){ window.location.href = “http://google.com”; } } }); …

Auto Complete Search Selengkapnya »

Maps with Marker

<!DOCTYPE html> <html> <head> <title>Add Marker to Map</title> <meta name=”viewport” content=”initial-scale=1.0, user-scalable=no”> <meta charset=”utf-8″> <style> html, body, #map-canvas { height: 90%; margin: 0px; padding: 0px } </style> <script src=”https://maps.googleapis.com/maps/api/js?v=3.exp”></script> <script src=”https://code.jquery.com/jquery-1.11.1.min.js”></script> <script> var map; function initialize() { var mapOptions = { zoom: 8, center: new google.maps.LatLng(1.288633, 103.837534) }; map = new google.maps.Map(document.getElementById(‘map-canvas’), mapOptions); } google.maps.event.addDomListener(window, …

Maps with Marker Selengkapnya »

List Style Counter

2 TITLE 2.1 2.2 2.3 <style type=”text/css”> .custom ol { counter-reset: item; padding-left: 0px; } .custom li { display: block; margin-bottom: 8px; margin-left: 40px; } .custom li:before { content: counters(item, “.”) ” “; counter-increment: item; margin-left: -45px; margin-right: 20px; } .custom ol > li.hehe:before { content: “Section ” counter(item); font-weight: bold; font-size: 18px; margin-left: -5px; …

List Style Counter Selengkapnya »

Custom Google Translate

<script type=”text/javascript”> function googleTranslateElementInit() { new google.translate.TranslateElement({pageLanguage: ‘en’, includedLanguages: ‘en,ms’, layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, ‘google_translate_element’); } </script> <script type=”text/javascript” src=”//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit”></script> <div id=”google_translate_element”></div> <style type=”text/css”> .goog-te-gadget-simple{ border: 0; border-radius: 4px; padding: 4px 8px !important; color: white; height: auto; font-size: 1.2em; background-color: #0d47a1 !important;border:0px !important;margin-top: 10px !important;color: #fff !important; } .goog-te-menu-value{ color: #fff !important; } .goog-te-gadget-icon{ display: none; } …

Custom Google Translate Selengkapnya »

Contact Form Inbox

<?php $errors = ”; $myemail = ‘me@hikmal.web.id’;//<—–Put Your email address here. if(empty($_POST[‘name’])){ $errors .= “n Error: all fields are required”; } $name = $_POST[‘name’]; $email = $_POST[‘email’]; $subject = $_POST[‘subject’]; $message = $_POST[‘message’]; if( empty($errors)){ $to = $myemail; $email_subject = “Contact form submission: $name”; $email_body = ” <html> <head></head> <body> <h2>Enquiry From $name</h2> <hr style=’width:100%’> …

Contact Form Inbox Selengkapnya »

×