Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery once

// npm     npm install jquery-once --save
// Github: https://github.com/RobLoach/jquery-once
// jsDelivr   	//cdn.jsdelivr.net/npm/jquery-once@2.2.3/jquery.once.min.js
// cdnjs	   //cdnjs.cloudflare.com/ajax/libs/jquery-once/2.2.3/jquery.once.js

$('p').once('changecolor').css('color', 'red');

// To execute a function on the once set, you can use jQuery's each().
$('div.calendar').once().each(function() {
  // Since there is no once ID provided here, the key will be "once".
});
Source by github.com #
 
PREVIOUS NEXT
Tagged: #jquery
ADD COMMENT
Topic
Name
5+4 =