Generate API Reference documentation
Follow those steps to generate API Reference documentation from a JSON file.
Knowledge is power
Follow those steps to generate API Reference documentation from a JSON file.
Have you ever wanted to remove the title only for front page in WordPress? Are you using Thematic theme? Than I have good news for you. Use this function to remove the title only on the first page of your Thematic theme in WordPress: Code: function remove_front_pagetitle($posttitle) { if ( is_front_page() ) { $posttitle = … Read more
Please read this article to learn how to easy move search field to another part of your page. In my case I will move it to my custom menu. First you need to copy the code for the search form from: /catalog/view/theme/-yourtheme-/template/common/header.tpl Code: <div id=”search”> <div class=”button-search”></div> <?php if ($filter_name) { ?> <input type=”text” name=”filter_name” … Read more
OpenCart already uses jquery so all you need to is to pass focus() function to input username to make it focus on the username field. Here is how to do it. Open the following file in your favorite php editor: /admin/view/template/common/login.tpl and copy/paste this code: Code: $(document).ready(function() { $(“input[name=username]”).focus(); });
Here is en example code on how to make a custom facebook share button. Code: <script>function fbs_click() {u=location.href;t=document.title;window.open(‘https://www.facebook.com/sharer.php?u=’+encodeURIComponent(u)+’&t;=’+encodeURIComponent(t),’sharer’,’toolbar=0,status=0,width=626,height=436′);return false;}</script><a href=’https://www.facebook.com/share.php?u=<url>’ onclick=’return fbs_click()’ target=’_blank’><img src=’SOURCE_TO_YOUR_IMAGE’ alt=’facebook’ title=’Share on facebook’ /></a></script>
Around the forums has been discussed on how to close prettyPhoto modal from within an iframe. I’ve tried many of solutions posted there without success. Here’s one solutions on how to do it. To close prettyPhoto from an iframe just call the following: <script type=”text/javascript”> parent.eval(‘$.prettyPhoto.close()’); </script>
This script below will detect left mouse click and pop up an alert when you left click on the link “Click me”. Code: <script> $(function(){ $(“#click-me”).live(‘click’, function(e) { if( e.button == 0 ) { // Clicked with left mouse button alert(‘You clicked with left mouse button’); } }); }); </script> <a id=”click-me”>Click me</a>
There are two simple ways to disable enter key in your forms. 1. The first one is a piece of javascript that you include in your head section. <script language=”JavaScript”>function disableEnterKey(e){var key;if(window.event)key = window.event.keyCode; //IEelsekey = e.which; //firefoxif(key == 13)return false;elsereturn true;} 2. Than in the form issue onKeyPress like this: <input type=”text” onkeypress=”return disableEnterKey(event)”> … Read more