Skip to content

Instantly share code, notes, and snippets.

@mynameispj
mynameispj / states-ul
Created April 2, 2012 19:29
<ul> of all 50 states
<ul>
<li>AL<li>
<li>AK<li>
<li>AZ<li>
<li>AR<li>
<li>CA<li>
<li>CO<li>
<li>CT<li>
<li>DE<li>
<li>DC<li>
@mynameispj
mynameispj / gist:2237482
Created March 29, 2012 13:36
jQuery snippet to remove and replace default form input text on click
$('form.form-search input').focus(function() {
if (this.value == this.defaultValue){
this.value = '';
}
if(this.value != this.defaultValue){
this.select();
}
});
$('form.form-search input').blur(function() {
if ($.trim(this.value) == ''){
@mynameispj
mynameispj / drupal_6_updateCache
Created March 16, 2012 16:21
Drupal 6 custom module to update all site caches
function z_masterfit_ui_customized_menu() {
$items = array();
$items['admin/flush-cache'] = array(
'type' => MENU_NORMAL_ITEM,
'title' => t('Flush the cache'),
'description' => 'Flush all website caches to make sure it updates to relect '.
'your recent changes.',
'page callback' => 'flush_cache_custom_callback',
'access callback' => user_access('flush cache'),