Skip to content

kjantzer/backbonejs-panel-view

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BackboneJS: Panel View

Sliding panel views that stack. Complete with optional toolbar and footer. Automatically resizes when window size changes.

Preview

Requires

  • LESS CSS
  • Elements.less
  • CodeKit

Use

Add this in your <head> tag

<!-- Panel View Controller -->
<script id="template-panel-controller" type="text/html">
<div class="panel-overlay"></div>
<ul class="panel-outer"></ul>
</script>

<!-- Panel View -->
<script id="template-panel-view" type="text/html">
<div class="panel-inner">
	
	<div class="panel-header">
		<div class="panel-close"></div>
		<h3 class="panel-title"></h3>
	</div>
	
	<div class="panel-toolbar clearfix"></div>
	<div class="panel-content"></div>
	<div class="panel-footer clearfix"></div>

</div>
</script>
<script src="Panel/Panel-final.js" type="text/javascript"></script>

Then create your panel(s)

var MyPanel = Panel.View.extend({

    title: 'My Panel',
    w: 400,
    
    render: function(){
        this.$content.html('Content here');
    },
    
    footer: 'This text will show in the footer. Set footer:false for no footer, or use a function to return something more dynamic'

});

myPanel = new MyPanel();

myPanel.open()

About

Responsive sliding panel views that stack. Complete with optional toolbar and footer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages