jQuery ကျူတိုရီရယ်

jQuery ပင်မစာမျက်နှာ jQuery မိတ်ဆက် jQuery စတင်လိုက်ပါ။ jQuery Syntax jQuery ရွေးချယ်မှုများ jQuery ပွဲများ

jQuery အကျိုးသက်ရောက်မှုများ

jQuery ဖျောက်/ပြပါ။ jQuery အရောင်မှိန်ခြင်း။ jQuery Slide jQuery Animate jQuery stop() jQuery ပြန်ခေါ်ပါ။ jQuery ချိတ်ဆက်ခြင်း။

jQuery HTML

jQuery ကိုရယူပါ။ jQuery သတ်မှတ် jQuery ကိုထည့်ပါ။ jQuery ကိုဖယ်ရှားပါ။ jQuery CSS အတန်းများ jQuery css() jQuery အတိုင်းအတာများ

jQuery လမ်းလျှောက်ခြင်း။

jQuery လမ်းလျှောက်ခြင်း။ jQuery ဘိုးဘေးများ jQuery မျိုးဆက်များ jQuery မောင်နှမများ jQuery စစ်ထုတ်ခြင်း။

jQuery AJAX

jQuery AJAX နိဒါန်း jQuery Load jQuery Get/Post

jQuery ထွေ

jQuery noConflict() jQuery စစ်ထုတ်မှုများ

jQuery ဥပမာများ

jQuery ဥပမာများ jQuery စာမေးပွဲ jQuery လေ့ကျင့်ခန်းများ jQuery လက်မှတ်

jQuery ကိုးကားချက်များ

jQuery ခြုံငုံသုံးသပ်ချက် jQuery ရွေးချယ်မှုများ jQuery ပွဲများ jQuery အကျိုးသက်ရောက်မှုများ jQuery HTML/CSS jQuery လမ်းလျှောက်ခြင်း။ jQuery AJAX jQuery ထွေ jQuery ဂုဏ်သတ္တိများ

jQuery height() နည်းလမ်း

❮ jQuery HTML/CSS နည်းလမ်းများ

ဥပမာ

<div> ဒြပ်စင်တစ်ခု၏ အမြင့်ကို ပြန်ပေးပါ။

$("button").click(function(){
  alert($("div").height());
});

အဓိပ္ပါယ်နှင့် အသုံးပြုမှု

အမြင့်() နည်းလမ်းသည် ရွေးချယ်ထားသော အစိတ်အပိုင်းများ၏ အမြင့်ကို သတ်မှတ် သို့မဟုတ် ပြန်ပေးသည်။

ဤနည်းလမ်းကို အမြင့်ပြန်ပို့ရန် အသုံးပြုသောအခါ ၎င်းသည် FIRST လိုက်ဖက်သောဒြပ်စင်၏ အမြင့်ကို ပြန်ပေးသည်။

အမြင့် သတ်မှတ်ရန် ဤနည်းလမ်းကိုအသုံးပြုသောအခါ ၊ ၎င်းသည် လိုက်ဖက်သောဒြပ်စင်အားလုံး၏အမြင့်ကို သတ်မှတ်ပေးသည်။

အောက်ဖော်ပြပါပုံတွင် ဖော်ပြထားသည့်အတိုင်း၊ ဤနည်းလမ်းတွင် padding၊ border သို့မဟုတ် margin မပါဝင်ပါ။

jQuery အတိုင်းအတာများ


ဆက်စပ်နည်းလမ်းများ-

  • width() - ဒြပ်စင်တစ်ခု၏ အကျယ်ကို သတ်မှတ် သို့မဟုတ် ပြန်ပေးသည်။
  • innerWidth() - ဒြပ်စင်တစ်ခု၏ အကျယ်ကို ပြန်ပေးသည် ( padding ပါဝင်သည် )
  • innerHeight() - ဒြပ်စင်တစ်ခု၏ အမြင့်ကို ပြန်ပေးသည် ( padding ပါဝင်သည် )
  • outerWidth() - element တစ်ခု၏ အကျယ်ကို ပြန်ပေးသည် ( padding နှင့် border ပါ၀င်သည် )
  • outerHeight() - ဒြပ်စင်တစ်ခု၏အမြင့်ကို ပြန်ပေးသည် ( padding နှင့် border ပါ၀င်သည် )


အထားအသို

အမြင့်ကို ပြန်ပေးပါ။

$(selector).height()

အမြင့်ကို သတ်မှတ်ပါ-

$(selector).height(value)

လုပ်ဆောင်ချက်တစ်ခုသုံးပြီး အမြင့်ကို သတ်မှတ်ပါ-

$(selector).height(function(index,currentheight))

Parameter Description
value Required for setting height. Specifies the height in px, em, pt, etc.
Default unit is px
function(index,currentheight) Optional. Specifies a function that returns the new height of selected elements
  • index - Returns the index position of the element in the set
  • currentheight - Returns the current height of the selected element

သင်ကိုယ်တိုင်စမ်းကြည့်ပါ - ဥပမာများ


မတူညီသောယူနစ်များကို အသုံးပြု၍ ဒြပ်စင်တစ်ခု၏အမြင့်ကို သတ်မှတ်နည်း


ဒြပ်စင်တစ်ခု၏အမြင့်ကိုတိုးရန် ဖန်ရှင်ကိုအသုံးပြု၍


အမြင့်ကို ပြန်ပေးနည်း စာရွက်စာတမ်းနှင့် ဝင်းဒိုးဒြပ်စင်များ၏ လက်ရှိအမြင့်ကို ပြန်ပေးနည်း။


width(), height(), innerHeight(), innerWidth(), outerWidth() နှင့် outerHeight() ကို အသုံးပြုနည်း


❮ jQuery HTML/CSS နည်းလမ်းများ