-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscripts.js
More file actions
26 lines (23 loc) · 958 Bytes
/
scripts.js
File metadata and controls
26 lines (23 loc) · 958 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
jQuery(document).ready(function() {
/* Header Search Field
*********************************************************/
jQuery('.search-field-toggle').click(function() {
jQuery(this).toggleClass('search-field-visible');
if (jQuery(this).hasClass('search-field-visible')) {
jQuery('.header-main-search-field').fadeIn(400);
// Add focus on the opened field
jQuery( ".header-main-search-field .search_field" ).focus();
// Add placeholder for the opened field
jQuery( ".header-main-search-field .search_field" ).attr("placeholder", "Type in and hit enter");
}
if (!jQuery(this).hasClass('search-field-visible')) {
jQuery('.header-main-search-field').fadeOut(400);
}
});
/* Header Social Section
*********************************************************/
jQuery('.ufld_icon_links').click(function() {
// When < 992px, social in header becomes drop-down
$( '.ufld_icon_links a' ).toggleClass(' drop-down-social');
});
});