Coding

Show File with PHP

<?php foreach ($files as $key => $value) { if($value!=’.’ AND $value!=’..’){ echo “<img src=’folder/”.$value.”‘ class=’img-responsive’>”; } } ?>

Scroll Animation

<script type=”text/javascript”> $(‘a[href*=”#”]:not([href=”#”])’).click(function() { if (location.pathname.replace(/^//, ”) == this.pathname.replace(/^//, ”) && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $(‘[name=’ + this.hash.slice(1) + ‘]’); if (target.length) { $(‘html, body’).animate({ scrollTop: target.offset().top }, 1000); return false; } } }); </script>

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 »

Mouse Cursor

auto crosshair default e-resize grab help move n-resize ne-resize nw-resize pointer progress s-resize se-resize sw-resize text w-resize wait not-allowed no-drop <span style=”cursor:auto”>auto</span><br> <span style=”cursor:crosshair”>crosshair</span><br> <span style=”cursor:default”>default</span><br> <span style=”cursor:e-resize”>e-resize</span><br> <span style=”cursor:grab”>grab</span><br> <span style=”cursor:help”>help</span><br> <span style=”cursor:move”>move</span><br> <span style=”cursor:n-resize”>n-resize</span><br> <span style=”cursor:ne-resize”>ne-resize</span><br> <span style=”cursor:nw-resize”>nw-resize</span><br> <span style=”cursor:pointer”>pointer</span><br> <span style=”cursor:progress”>progress</span><br> <span style=”cursor:s-resize”>s-resize</span><br> <span style=”cursor:se-resize”>se-resize</span><br> <span style=”cursor:sw-resize”>sw-resize</span><br> <span style=”cursor:text”>text</span><br> <span style=”cursor:w-resize”>w-resize</span><br> <span …

Mouse Cursor 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”>

Remove Menu WP Admin

put it on your function.php theme add_action( ‘admin_menu’, ‘my_remove_menu_pages’ ); function my_remove_menu_pages() { remove_menu_page( ‘index.php’ ); //Dashboard remove_menu_page( ‘edit.php’ ); //Posts remove_menu_page( ‘upload.php’ ); //Media remove_menu_page( ‘edit.php?post_type=page’ ); //Pages remove_menu_page( ‘edit-comments.php’ ); //Comments remove_menu_page( ‘themes.php’ ); //Appearance remove_menu_page( ‘plugins.php’ ); //Plugins remove_menu_page( ‘users.php’ ); //Users remove_menu_page( ‘tools.php’ ); //Tools remove_menu_page( ‘options-general.php’ ); //Settings }

×