Files
componentowl.com/blog/wp-content/themes/componentowl/javascripts/theme.js

32 lines
771 B
JavaScript
Raw Normal View History

2026-03-23 16:10:59 +00:00
(function($) {
$(document).ready(function() {
$(".d-menu li").each(function() {
var $this = $(this);
var dropdown = $this.find(".dropdown");
if (dropdown.size() == 1) {
$this.hover(function() {
$this.addClass("with-dropdown-hover");
dropdown.show();
}, function() {
$this.removeClass("with-dropdown-hover");
dropdown.hide();
});
}
});
$("input.inline-label").each(function() {
$(this).data("initial_value", $(this).val());
});
$("input.inline-label").focus(function() {
var el = $(this);
el.addClass("inline-label-focus");
if (el.val() == el.data("initial_value")) {
el.val("");
}
});
});
})(jQuery);