Ceci est une ancienne révision du document !
// Trigger
$('.volume').on('mousemove', function(e)
{
console.log(e);
console.log(e.pageX);
$('.volume').trigger('mousedown', [e.pageX] );
});
// We get the value as
$('.volume').on('mousedown', function(e, altPageX)
{
console.log(e);
console.log(altPageX);
});
Throttle : Similar to debouncing but ensure a minimum execution of the function every fixed time
Using jQuery's .one() can also work.
if( typeof google_step != 'undefined')
{
// ...
}
var tmpDisable = {};
var lastTmpDisable = {};
lastTmpDisable = tmpDisable; // Any change made to any of these object will be on both because they're references
// If we declare it this way a new object is created
for(var key in tmpDisable)
{
lastTmpDisable[key] = tmpDisable[key]
}
var size = Object.keys(myObj).length;