[X] Choose Font Here

jQuery Syntax

JQuery Basic syntax က $(selector).action( )  ပဲျဖစ္ပါတယ္။ သေဘာကေတာ့   html elements   ေတြကို    select

လုပ္ျပီး  action  တစ္ခုကိုခိုင္းေစတာပဲျဖစ္ပါတယ္။ အဲဒီ Basic syntax  မွာ

- A dollar sign to define jQuery
- A (selector) to "query (or final)" Html elements
- An JQuery action ( ) to be performed upon the elements ( )

ေအာက္မွာ  Example   ေလးနဲ႕ၾကည့္လိုက္ရေအာင္

$(this).hide( ) - hides current element

- လက္ရွိ   Html element  ကို  hide  လုပ္ေပးမွာျဖစ္ပါတယ္။   hide( ) ဆိုကေတာ့   action   ျဖစ္ပါတယ္

$("p").hide( ) - hides all paragraphs
- <p></p>   ၾကားမွာရွိေနေသာအရာအားလံုးကို  Hide လုပ္ေပးမွာျဖစ္ပါတယ္။

$("# test").hide( ) - hides the element with id = "test"
- HTML Tag ေတြၾကားထဲမွာ id = "test"    လို႕ေပးထားတာမွန္သမွ်ကို  hide   လုပ္ပစ္တာျဖစ္ပါတယ္။

$(".test").hide( ) - Hides the element with class ="test"

- HTML Tag ေတြၾကားထဲမွာ class = "test"    လို႕ေပးထားတာမွန္သမွ်ကို  hide   လုပ္ပစ္တာျဖစ္ပါတယ္။

 

Document Ready Function

jQuery   ေရးျပီဆုိတာနဲ႕စျပီးေရးရမယ့္  Document Ready Function   ပဲျဖစ္ပါတယ္။  <script> tag     ဖြင့္ျပီးတာနဲ႕

စျပီးေရးရမွာျဖစ္ပါတယ္



$(document).ready(function(){

--- jQuery functions go here ----

});

Simple Ajax   ေရးတာနဲ႕စာရင္အမ်ားၾကီး  coding  ေရးရတာနည္းသြားတာကိုေတြ႕နိုင္ပါတယ္။ ေနာက္   post  မွာေတာ့ 

 

<p>   ကို  Hide လုပ္တဲ့   sample   ေလးကိုေရးပါမယ္။

 

 

Comments (0)
Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:D:angry::angry-red::evil::idea::love::x:no-comments::ooo::pirate::?::(
:sleep::););)):0
Security
Please input the anti-spam code that you can read in the image.

Login Form

Categories Table View

JoomlaWatch Stats 1.2.9 by Matej Koval

Facebook Share

Share on facebook

Accordion FAQ

mod_joomtouch

Version Iphone

Version Iphone by JoomTouch