-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathC-mega.js
More file actions
99 lines (58 loc) · 2.2 KB
/
Copy pathC-mega.js
File metadata and controls
99 lines (58 loc) · 2.2 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
jQuery(document).ready(function($){
//getting the measurements for the border
$('#mm-women').css('display', 'block');
var boxHeight1 = $('#height2').height();
var boxHeight2 = $('#height1').height();
$('#mm-women').css('display', 'none');
//setting the box height for the border to be the same size
if(boxHeight1 > boxHeight2){
$('.inner-box').css('height', boxHeight1);
} else{
$('.inner-box').css('height', boxHeight2);
}
//hover image states nav with text
$('#menu .icon-color').hover(function(){
// Change the featured menu image, link, and path
var linkTitle = $(this).data('title');
var linkAddress = $(this).attr('href');
var imgPath = $(this).data('img-path');
var featuredImage = $('<img src="' + imgPath + '" />');
featuredImage.load(function() {
// Center the featured image
var imgHeight = this.height;
var contHeight = 279;
var padding = (contHeight - imgHeight)/2;
$('.image-change').attr({
src: imgPath,
alt: linkTitle,
});
$('.shoe-img-holder img').css('margin-top', padding + "px");
});
$('.image-link').attr({
href: linkAddress
});
$('.right-link').attr({
href: linkAddress
})
$('.right-link').text(linkTitle);
// Change link background image to green
var regClass = $(this).data('hover-out');
var hoverClass = $(this).data('hover-over');
$(this).parent('li').removeClass(regClass).addClass(hoverClass);
}, function(){
// Change link background image back to grey
var regClass = $(this).data('hover-out');
var hoverClass = $(this).data('hover-over');
$(this).parent('li').removeClass(hoverClass).addClass(regClass);
});
//hover over states colors and sizes
$('#crocmenu .icon-circle').hover(function(){
var regClass = $(this).data('hover-out');
var hoverClass = $(this).data('hover-over');
$(this).removeClass(regClass).addClass(hoverClass);
}, function(){
var regClass = $(this).data('hover-out');
var hoverClass = $(this).data('hover-over');
$(this).removeClass(hoverClass).addClass(regClass);
});
}); // end $(document).ready(function(){