-// Use this as a template for new Gallery entries.
Gallery.register(
'link-interaction',
{
name: 'Link Interaction',
setup: function(parent) {
- parent.innerHTML =
- "<div id='div_g'></div>" +
- "<b>Zoom:</b>" +
- "<a href='#' id='hour'>hour</a> " +
- "<a href='#' id='day'>day</a> " +
- "<a href='#' id='week'>week</a> " +
- "<a href='#' id='month'>month</a> " +
- "<a href='#' id='full'>full</a> " +
- "<b>Pan:</b> " +
- "<a href='#' id='left'>left</a> " +
- "<a href='#' id='right'>right</a> ";
+ parent.innerHTML = [
+ "<div id='div_g'></div>",
+ "<b>Zoom:</b>",
+ "<a href='#' id='hour'>hour</a> ",
+ "<a href='#' id='day'>day</a> ",
+ "<a href='#' id='week'>week</a> ",
+ "<a href='#' id='month'>month</a> ",
+ "<a href='#' id='full'>full</a> ",
+ "<b>Pan:</b> ",
+ "<a href='#' id='left'>left</a> ",
+ "<a href='#' id='right'>right</a> "].join("\n");
},
run: function() {
var r = [ ];
document.getElementById('left').onclick = function() { pan(-1); };
document.getElementById('right').onclick = function() { pan(+1); };
}
- });
\ No newline at end of file
+ });