This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
glow.ready(function() { | |
var myPanel = new glow.widgets.Panel("#formPanel"); | |
//display panel | |
myPanel.show(); | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
glow.ready(function() { | |
// create your panel, this will take it off the page | |
// the form must have id="form" for the below to work | |
var myPanel = new glow.widgets.Panel("#form"); | |
// listen for clicks on the "Enquire Now!" button | |
// The "Enquire Now!" button must have id="enquireNow" | |
glow.events.addListener('#enquireNow', 'click', function() { | |
// show the panel | |
myPanel.show(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="panel1"> | |
<p>This is my first Panel</p> | |
</div> | |
<div id="panel2"> | |
<p>This is my second Panel</p> | |
</div> | |
<p><a href="#" id="showFirstPanel">Show first panel</a></p> | |
<p><a href="#" id="showSecondPanel">Show second panel</a></p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
glow.events.addListener(theForm, 'submit', function() { | |
// do your ajax stuff here | |
// prevent the form submitting | |
return false; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return ( | |
a[2] < b[0] ? 0 : | |
b[2] < a[0] ? 0 : | |
a[0] < b[0] ? (a[2] < b[2] ? a[2] - b[0] : b[2] - b[0]) : | |
b[2] < a[2] ? b[2] - a[0] : a[2] - a[0] | |
) * ( | |
a[1] < b[3] ? 0 : | |
b[1] < a[3] ? 0 : | |
a[3] < b[3] ? (a[1] < b[1] ? a[1] - b[3] : b[1] - b[3]) : | |
b[1] < a[1] ? b[1] - a[3] : a[1] - a[3] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
glow.events.addListener(theForm, 'submit', function() { | |
// do your ajax stuff here | |
// prevent the form submitting | |
return false; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
(function() { | |
var glow; | |
gloader.load( | |
["glow", "1", "glow.widgets.Panel"], | |
{ | |
async: true, | |
onLoad: function(g) { | |
glow = g; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new glow.widgets.Timetable(container, startTime, endTime, viewStartTime, viewEndTime, { | |
// timetable options | |
tracks: [ | |
// add an array for each track like this... | |
[trackTitle, trackSize, { | |
// track options | |
items: [ | |
// add an array like this for each item | |
[title, startTime, endTime, opts] | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createCookie(name,value,days) { | |
if (days) { | |
var date = new Date(); | |
date.setTime(date.getTime()+(days*24*60*60*1000)); | |
var expires = "; expires="+date.toGMTString(); | |
} | |
else var expires = ""; | |
document.cookie = name+"="+value+expires+"; path=/"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function.prototype.delay = function(ms, obj) { | |
setTimeout(function() { | |
this.call(obj); | |
}, ms) | |
} |