Showing posts with label JQuery. Show all posts
Showing posts with label JQuery. Show all posts

How to include jquery.js

Well, I just updated our company site then suddenly i have a error on one of my scripts written in jquery after a time searching for this problem i've noticed that jquery.js was not loaded.



Solution for this is creating a script.js inside your theme directory. Suppose you have a custom theme we will name as "custom_theme". inside your custom_name folder create a script.js file this way drupal will load this file as well as jquery.js



you can dig more about this in drupal http://drupal.org/node/243134

How to add custom javascript file in drupal

Please visit my site http://www.arnelbornales.site90.net/content/how-to-add-custom-javascript-file-in-drupal ,there i put my code about this.

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.