Posts Tagged ‘Jquery’

Let’s get started with jQuery

February 27th, 2009 No comments

Nowadays you may see tons of Javascript frameworks coming up. The truth is that it makes your code efficient if a framework used instead of pure javascript code. Most of the javascript frameworks helps you to solve crossbrowser difficulties. Probably you heard about Prototype and MooTools. You may see some people are trying to decide between these frameworks. I should say i am fan of jQuery. jQuery comes with tons of futures and flexibility and you can do a big work with less effort and it is not just a regular library however jQuery is even ajax and effect library. It does evertything i need with piece of code.

jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.

Let’s say you are using some other libraries as well, there it goes, jQuery is such a good friend with other libraries. API designed with conciseness and convenience as the driving factors.

Before start with jQuery i want you to know some basics about it. You can download the framework basically from then download it on your desktop. This is how jQuery places in html code.

<strong><script type="text/javascript" src="jquery.js"></script></strong>
<script type="text/javascript">
<strong>// Your code goes here</strong>
<a href="">jQuery</a>

You can start with placing your core *.js file which is jquery.js for this example.

Read more…

VN:F [1.9.22_1171]
Rating: 4.0/10 (6 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Categories: General, Jquery, PHP, Programming Tags: , , ,

Embed php into Javascript

February 24th, 2009 No comments

In javascript you cannot read variables from a server instanly however if you embed your php code you may pass variables into javascript code.

So php can pass its variables when page loads. Here is an example using jquery

< ?php $variable = 'Here is value'; ?>
<script type= "text/javascript">
var button = < ?php echo $variable; ?> ;

Read more…

VN:F [1.9.22_1171]
Rating: 3.8/10 (6 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)