「jQuery Mobile」document ready イベントを利用する方法

2020年10月23日

構文
$(selector).on(“click",function(){
})
JavaScriptコード

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<script>
$(document).ready(function(){
$("div").on("click",function(){
$(this).hide();
});
});
</script>
<script> $(document).ready(function(){ $("div").on("click",function(){ $(this).hide(); }); }); </script>
<script>
$(document).ready(function(){
  $("div").on("click",function(){
    $(this).hide();
  });
});
</script>

htmlコード
<div>A001</div>
<div>B002</div>
<div>C003</div>

jQuery Mobile

Posted by arkgame