element.style.property
или через атрибут style в html:element.style.property = void 0; //void 0 - это оператор возвращающий безопасный undefined
ну было бы всё так просто, исходную html-разметку редактировать нельзя ((Стилевые правила можно создавать/удалять/заменять динамически, через js
function Foo() { //конструкторы пишем с большой буквы
//...
}
//методы пишем в прототип
Foo.prototype = {
baz: function() {
//...
},
bar: function() {
var $this = this;
$.ajax({
success: function(html) {
$this.baz();
}
});
}
};
class Foo {
constructor() {
//...
}
baz() {
//...
}
bar() {
$.ajax({
success: html => {
this.baz();
}
});
}
}
!function($) {
$.fn.hoverWithTimeout = function(timeout, callback) {
$(this).each(function() {
var $this = $(this);
var timer;
$this.on('mouseover', function(e) {
timer = setTimeout(function() {
callback.call($this, e);
}, timeout);
});
$this.on('mouseout', function() {
clearTimeout(timer);
});
});
};
}(jQuery);