forked from pupunzi/jquery.mb.extruder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo_top_callback.html
executable file
·43 lines (39 loc) · 1.7 KB
/
demo_top_callback.html
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
<!doctype html>
<!--
~ jquery.mb.components
~ Copyright (c) 2001-2010. Matteo Bicocchi (Pupunzi); Open lab srl, Firenze - Italy
~ email: [email protected]
~ site: http://pupunzi.com
~
~ Licences: MIT, GPL
~ http://www.opensource.org/licenses/mit-license.php
~ http://www.gnu.org/licenses/gpl.html
-->
<html>
<head>
<link href="css/mbExtruder.css" media="all" rel="stylesheet" type="text/css">
<script type="text/javascript" src="http://jquery.com/src/jquery-latest.js"></script>
<script type="text/javascript" src="inc/jquery.hoverIntent.min.js"></script>
<script type="text/javascript" src="inc/jquery.metadata.js"></script>
<script type="text/javascript" src="inc/mbExtruder.js"></script>
<script type="text/javascript">
$(function(){
$("#extruderTopCallback").buildMbExtruder({});
});
var contentFromFunction = function(data) {
return [
'<div class="voice {panel:\'parts/extr.creativity.html\'}"><span class="label">1. ' + data + '</span></div>',
'<div class="voice {panel:\'parts/extr.network.html\'}"><span class="label">2. ' + data + '</span></div>',
'<div class="voice {htmlCallback:\'panelFromFunction\', data: \'{"href" : "http://google.com", "title" : "Google from htmlCallback"}\'}"><span class="label">3. ' + data + '</span></div>'
].join('\n');
}
var panelFromFunction = function(data) {
var info = JSON.parse(unescape(data));
return '<div><a href="' + info.href + '" class="external" >' + info.title + '</a></div>';
}
</script>
</head>
<body>
<div id="extruderTopCallback" class="{title:'extruder top', htmlCallback: 'contentFromFunction', data: 'Menu from htmlCallback'}"></div>
</body>
</html>