“Документ jQuery” Ответ

Вызовите функцию на загрузке jQuery

$(document).ready(function () {
  // Function code here.
});
Zany Zebra

Документ готов JS

document.addEventListener("DOMContentLoaded", function(event) { 
  //we ready baby
});
Grepper

Документ jQuery

$(function(){
  // equal to $( document ).ready(function() {
});
  
Thibaudkhan

jQuery проверяет, загружен ли документ

jQuery offers several ways to attach a function that will run when the DOM is ready. All of the following syntaxes are equivalent:

$( handler )
$( document ).ready( handler )
$( "document" ).ready( handler )
$( "img" ).ready( handler )
$().ready( handler )
Smiling Stoat

Ответы похожие на “Документ jQuery”

Вопросы похожие на “Документ jQuery”

Больше похожих ответов на “Документ jQuery” по JavaScript

Смотреть популярные ответы по языку

Смотреть другие языки программирования