Remove simple attribute with attr()


Remove simple attribute with removeAttr() method


$("#t2").click(function() { $(this).removeAttr("class") });
Well, this code has no problem except under IE


this code seems to be the solution using attr("class", "")


Remove the same attribute with attr() method


$("#t3").click(function() { $(this).attr("class", "") });


Get the current date using jquery

In this first jQuery tutorial we will develop a simple program that retrieves the current time from server and displays on the user browser. In this example we will be calling a server side PHP script to get the current server time. You can easily replace PHP with JSP, or ASP program.

How to add a collapsible fieldset in your theme/template

Creating a class collapsible inside a Fieldset in your template file or in your theme functio

is not enough like "fieldset class="collapsible skills_group">TESTfieldset"

you need to include

drupal_add_js('misc/collapse.js');

in your hook load or in your theme function.

How to add a contact form in a page

Here is my sample code which I made from http://kinse.net/contact_us
<?php
require_once drupal_get_path('module', 'contact') .'/contact.pages.inc';
//no need to maintain two version of node.tpl.php
//include "node.tpl.php";
function local_contact_page(){
$form = contact_mail_page();
// override default values here if you want
// next one will select a different category
//$form['cid']['#default_value'] = 0;
return($form);
}


function local_contact_page_submit($form_id, $form_values){
return(contact_mail_page_submit($form_id, $form_values));
}

function local_contact_page_validate($form, $form_state){
return(contact_mail_page_validate($form, $form_state));
}
?>

Welcome to KINSE Systems Website

<?php print t('Contact Us'); ?>



<?php // here we will render the contact form
print drupal_get_form('local_contact_page'); ?>

How to add a new region in drupal 6 themes

When you want to configure your default theme like
adding new region just edit your .info file of your theme
e.g garland.info


Here is an example code:


regions[logout] = Logout
regions[left] = Left sidebar
regions[right] = Right sidebar
regions[header] = Header
regions[content] = Content
regions[footer] = Footer