Clear fields onclick onblur and other functions
Apr 5th
[ input type="text" name="field-name-here" onclick="this.value='';" onfocus="this.select()" onblur="this.value=!this.value?'Enter Email To Get Updates':this.value;" value="Enter Email To Get Updates" />
Apr 2nd
/**CSS ROUNDED CORNERS for Mozilla, Webkit, Linux, Opera, IE9**/
#Your-Div-Name{
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
-khtml-border-radius: 20px;
border-radius: 20px;
}
WordPress Tags for Development
Mar 8th
WordPress Tags for Development
While doing wordpress development here in Dallas, Tx. I find that I need a tag reference quite often. I lifted this from another site, but it should do the trick. If any other graphic designers, or web developers run across this, I hope it helps.
<?php if ( is_page(‘about’)) { echo ‘<div id=”secondnav”>This is the super cool secondary navigation.</div>’; } ?>view raw example1.php This Gist brought to you by GitHub. The code is asking if the page is named “about”, if it is, it echo’s the div “secondnav”. If the page isn’t called “about” then it echo’s nothing and nothing is displayed. It’s that simple. If you want the nav to display on the “about”and “contact”page add this
<?php if ( is_page(‘about’) || is_page(‘contact’)) { echo ‘<div id=”secondnav”>This is the super cool secondary navigation.</div>’; } ?>view raw example2.php This Gist brought to you by GitHub. One place I find myself using this a lot is loading javascript only on pages that need it. One problem of adding javascript links to your footer.php file is that they are called on everypage whether you need them or not. The simple way to call them only when need is to add them like this
<?php if ( is_page(‘about’)) { echo ‘<script type=”text/javascript” src=”http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js”></script>’; } ?>view raw example3.php This Gist brought to you by GitHub. This works well for pages, but for your blog page and single posts you will need a different function.
For your blog page use is_home()
For your single posts use is_single()
WordPress provides a slew of other tags as well including
is_home(), is_front_page(), is_search(), is_404(), is_singular(), is_page(), is_attachment(), is_local_attachment(), is_single(), is_sticky(), is_archive(), is_category(), is_tag(), is_author(), is_date(), is_year(), is_month(), is_day(), is_time(), is_admin(), is_preview(), is_paged(), is_page_template(), is plugin active(), is_plugin_page(), is_new_day(), is_feed(), is_trackback(), is_comments_popup(), comments_open(), pings_open(), is_taxonomy(), is_taxonomy_hierarchical(), is_term(), is_user_logged_in(), is_blog_installed(), is_active_sidebar(), is_dynamic_sidebar(), is_active_widget()
Favicons & Icons for Sites
Feb 23rd
Here is the code required to add icons on apple supported devices.
With Apple’s Reflective Shine:
< link rel=”apple-touch-icon” href=”somepath/image.png” / >
Without Apple’s Reflective Shine:
< link rel=”apple-touch-icon-precomposed” href=”somepath/image.png” / >
The recommended basic size for this icon is 57×57 pixels, with 90 degree corners; for best display on the higher-resolution iPhone 4 screen, an icon size of 114×114 pixels is recommended.[29][31][32]
For the iPad and iPad2, the basic size is 72×72 pixels with 90 degree corners. If the rumored next generation follows the same pattern as the iPhone and iPodTouch, the high-resolution size would be 144×144 pixels.[33]
==========================================================
I Grabbed this off the wikipedia page:
| Google Chrome | Internet Explorer | Firefox | Opera | Safari | |
|---|---|---|---|---|---|
<link rel="shortcut icon" href="http://example.com/myicon.ico" /> |
Yes[4] | Yes[4][17] | Yes[4] | Yes[4] | Yes |
<link rel="icon" type="image/vnd.microsoft.icon" href="http://example.com/image.ico" /> |
Yes | No[23] | Yes | Yes | Yes |
<link rel="icon" type="image/png" href="http://example.com/image.png" /> |
Yes | No[23] | Yes | Yes | Yes |
<link rel="icon" type="image/gif" href="http://example.com/image.gif" /> |
Yes | No[23] | Yes | Yes | Yes |
favicon.ico located in the web site’s root |
Yes | Yes | Optional[24] | Optional[25] | Yes |
| precedence: prefer root or (X)HTML linked version | ? | root[21] | ? | ? | ? |
Tagging a telephone number in html
Feb 21st
use the callto: feature, such as:
< a href="callto:9725913086" title="Call us today">972.591.3086
JW Player – Adding Custom Logos
Jan 17th
Other options for the JW Player
'logo.file': 'image.png',
'logo.hide': 'false',
'logo.over': '1',
'logo.out': '1',
'logo.position': 'bottom-right',
'logo.margin': '0',
'logo.link': 'link.html',
'logo.linktarget': '_blank',
Contact Form 7 – Thank You Pages
Jan 11th
on_sent_ok: "location.replace('http://www.website.co.uk/thank-you/');"
Update WHMCS Password Info
Jan 11th
update tbladmins set password=md5(‘password’) where username=’username’
Onclick Functions in Different HTML Elements
Dec 22nd
onClick="javascript:window.location.href="main.jsp"







