Professional Documents
Culture Documents
ICT Literacy For Advanced Class #10: Sakurai Yusuke
ICT Literacy For Advanced Class #10: Sakurai Yusuke
ICT Literacy For Advanced Class #10: Sakurai Yusuke
jQuery is enable to change design and document instantly without transfer server.
(While jQuery has some main features, in this class we study about this feature.)
Ready to jQuery
Its need a declaration of using jQuery on googles server.
(You dont need download the file.)
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
e.g. This method turns texts of the element having id=display into a hello.
$ (#display).text(hello);
sign selector method
e.g.
e.g.
e.g.
$(#display).text(hello);
// Change the text of the element having id=display into hello.
$("#display").text("");
// Change the text of the element having id=display into blank.
(= Delete the text)
$(#display).width(100px);
// Change the width of the element having id=display into 100px.
jQuery text method
jQuery text method sets or returns the text content of selected elements.
$("#display").text("");
// Change the text of the element having id=display into blank.
(= Delete the text)
$("#display").text();
// Return the text of the element having id=display.
There are so many jQuery method. You don't have to memorize all of them.
When you need it, learn little by little as you examine it on the web.
The Document Ready Event
Before documents are completely loaded, any JavaScript and jQuery program
should not be executed (Defining the variables is fine).
The place to write programs that will be executed only once after loading the
document completely is bellow.
$(document).ready(function ($) {
// programs that will be executed only once after loading
the document completely should be written here
});