Guys,
Ik wil bezig met mijn website en wil een dubbel jQeury menu hebben in mijn content. Dus een menu naast het hoofdmenu.
Afbeelding niet beschikbaarDe bron kon niet worden geladen (img27.imageshack.us).Bron openen ↗Nu ben ik zover dat ik iets heb geproduceerd, naja eigenlijk van internet gehaald
, maar dan kan werkt er geen dubbel menu.
Codeblok (HTML):
1
2
3
4
5
6
7
Codeblok (script):
1
2
3
4
5
6
7
8
9
Codeblok (jQuery):
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
(function($) {
$.organicTabs = function(el, options) {
var base = this;
base.$el = $(el);
base.$nav = base.$el.find("nav");
base.init = function() {
base.options = $.extend({},$.organicTabs.defaultOptions, options);
// Accessible hiding fix
$(".hide").css({
"position": "relative",
"top": 0,
"left": 0,
"display": "none"
});
base.$nav.delegate("li > a", "click", function() {
// Figure out current list via CSS class
var curList = base.$el.find("a.current").attr("href").substring(1),
// List moving to
$newList = $(this),
// Figure out ID of new list
listID = $newList.attr("href").substring(1),
// Set outer wrapper height to (static) height of current inner list
$allListWrap = base.$el.find("section"),
curListHeight = $allListWrap.height();
$allListWrap.height(curListHeight);
if ((listID != curList) && ( base.$el.find(":animated").length == 0)) {
// Fade out current list
base.$el.find("#"+curList).fadeOut(base.options.speed, function() {
// Fade in new list on callback
base.$el.find("#"+listID).fadeIn(base.options.speed);
// Adjust outer wrapper to fit new list snuggly
var newHeight = base.$el.find("#"+listID).height();
$allListWrap.animate({
height: newHeight
});
// Remove highlighting - Add to just-clicked tab
base.$el.find("nav li a").removeClass("current");
$newList.addClass("current");
});
}
// Dont behave like a regular link
// Stop propegation and bubbling
return false;
});
};
base.init();
};
$.organicTabs.defaultOptions = {
"speed": 300
};
$.fn.organicTabs = function(options) {
return this.each(function() {
(new $.organicTabs(this, options));
});
};
})(jQuery);
Nu zoek ik iemand die een menu in een menu kan maken zeg maar. Kan iemand mij daarmee helpen? Bovenstaande code hoeft niet gebruikt te worden hoor, liever zelfs niet.
Alvast bedankt
Groet,
Patrick
Ik wil bezig met mijn website en wil een dubbel jQeury menu hebben in mijn content. Dus een menu naast het hoofdmenu.
Spoiler tonen
Afbeelding niet beschikbaarDe bron kon niet worden geladen (img27.imageshack.us).Bron openen ↗
, maar dan kan werkt er geen dubbel menu.Codeblok (HTML):
1
2
3
4
5
6
7
Codeblok (script):
1
2
3
4
5
6
7
8
9
Codeblok (jQuery):
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
(function($) {
$.organicTabs = function(el, options) {
var base = this;
base.$el = $(el);
base.$nav = base.$el.find("nav");
base.init = function() {
base.options = $.extend({},$.organicTabs.defaultOptions, options);
// Accessible hiding fix
$(".hide").css({
"position": "relative",
"top": 0,
"left": 0,
"display": "none"
});
base.$nav.delegate("li > a", "click", function() {
// Figure out current list via CSS class
var curList = base.$el.find("a.current").attr("href").substring(1),
// List moving to
$newList = $(this),
// Figure out ID of new list
listID = $newList.attr("href").substring(1),
// Set outer wrapper height to (static) height of current inner list
$allListWrap = base.$el.find("section"),
curListHeight = $allListWrap.height();
$allListWrap.height(curListHeight);
if ((listID != curList) && ( base.$el.find(":animated").length == 0)) {
// Fade out current list
base.$el.find("#"+curList).fadeOut(base.options.speed, function() {
// Fade in new list on callback
base.$el.find("#"+listID).fadeIn(base.options.speed);
// Adjust outer wrapper to fit new list snuggly
var newHeight = base.$el.find("#"+listID).height();
$allListWrap.animate({
height: newHeight
});
// Remove highlighting - Add to just-clicked tab
base.$el.find("nav li a").removeClass("current");
$newList.addClass("current");
});
}
// Dont behave like a regular link
// Stop propegation and bubbling
return false;
});
};
base.init();
};
$.organicTabs.defaultOptions = {
"speed": 300
};
$.fn.organicTabs = function(options) {
return this.each(function() {
(new $.organicTabs(this, options));
});
};
})(jQuery);
Nu zoek ik iemand die een menu in een menu kan maken zeg maar. Kan iemand mij daarmee helpen? Bovenstaande code hoeft niet gebruikt te worden hoor, liever zelfs niet.
Alvast bedankt
Groet,
Patrick
