This file contains hidden or 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
The problem: | |
The revolution slider requires that you include your layers and images inside of a <li> item. | |
when a plugin is editable it wraps the plugin in a div with a unique class id, in this case cms-plugin-16646. | |
I assume this is so it has a way to reference the element on double click in the visual editor. | |
<div class="cms-plugin cms-plugin-16646" style="display: inline;"> |
This file contains hidden or 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
module.exports = { | |
entry: "./app.js", | |
output: { | |
path: __dirname, | |
filename: "bundle.js" | |
} | |
}; |
This file contains hidden or 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
var TodoView = require('./views/todoview.js') | |
$(document).ready(function(){ | |
new TodoView(); | |
}); |
This file contains hidden or 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
var Todo = require('../models/todo.js') | |
var TodoList = require('../collections/todolist.js') | |
var TodoView = Backbone.View.extend({ | |
el: '#todo-container', | |
events: { | |
'keyup .new-todo-box': 'handleEnter' | |
}, | |
handleEnter: function(e){ |
This file contains hidden or 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
var Todo = require('../models/todo.js') | |
//a collection of todo model objects | |
var TodoList = Backbone.Collection.extend({ | |
//Todo model is a dependency so we require it at the top of this file. | |
model: Todo | |
}); | |
//simply just export your variable |
This file contains hidden or 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
var Todo = Backbone.Model.extend({ | |
}); | |
//simply just export your variable | |
//this will allow you to require it when creating other modules. | |
module.exports = Todo; | |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>todo</title> | |
<link rel="stylesheet" href="styles.css"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-beta1/jquery.min.js"></script> |
This file contains hidden or 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
var Todo = Backbone.Model.extend({ | |
}); | |
//a collection of todo model objects | |
var TodoList = Backbone.Collection.extend({ | |
model: Todo | |
}); | |
var TodoView = Backbone.View.extend({ |
This file contains hidden or 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
.wrapper { | |
width: 100%; | |
} | |
.wrapper .todo-container { | |
font-family: Sans-Serif; | |
background-color: #fff; | |
padding: 10px; | |
-webkit-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.75); | |
-moz-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.75); | |
box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.75); |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>todo</title> | |
<link rel="stylesheet" href="styles.css"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-beta1/jquery.min.js"></script> |