We saw few examples for getting started on web programming.
But I am not going to repeat the general structure of code.
You have to know how to write a complete html document, the javascript
will go into the head section.
And CSS also will go there. You can include multiple CSS or javascript
sources using the same syntax I
showed.
The main part of the code is what you write under
<script type="text/javascript">
$(function() {
<<<<<<<<<<<<<<<<<<<< Here
})
</script>
So this is called the document.load() callback. Once your page load in
the browser either using file:/// or
http:/// or https:// URL locally or remotely after the whole page
finishes loading the code snippet
inside the above container will execute.
So I am only going to write the code that goes into this location.
jQuery plugins are included like this.
<script type="text/javascript" src="jquery.timer.js"></script>
above the code we write.
Instead of the timer plugin you can include any plugin this way.
You can start learning the way I did by playing with plugins.
You can also open the plugin source code. But javascript is such a
complex language and very unlike
any other language I am familiar with, so it will take a long time to
get your head around it.
Be patient.
No hurry.
Once you get the joy part of jQuery and web programming and its
possibilities then you will be able to
justify yourself the pain that is needed to acquire javascript
programming skills.
Let us now look at a simple animation. jQuery does animation in
several different ways.
You have delay(), fadeIn(), fadeOut(), animate() and several other
ways to do simple animations.
But we can also animate using plain javascript.
Basically it is all about causing a slowness, writing some text,
deleting some text or moving DOM elements
around, changing colors or font characteristics, moving this around and so on.
I am going to write this code tomorrow.
I am finishing this mail.
I will send only the code. You have to figure out the rest. How to get
it working.
-Girish
--
Gayatri Hitech
http://gayatri-hitech.com
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines