Skip to content

Instantly share code, notes, and snippets.

View SpencerCooley's full-sized avatar

Spencer Cooley SpencerCooley

View GitHub Profile
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;">
module.exports = {
entry: "./app.js",
output: {
path: __dirname,
filename: "bundle.js"
}
};
var TodoView = require('./views/todoview.js')
$(document).ready(function(){
new TodoView();
});
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){
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
var Todo = Backbone.Model.extend({
});
//simply just export your variable
//this will allow you to require it when creating other modules.
module.exports = Todo;
<!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>
var Todo = Backbone.Model.extend({
});
//a collection of todo model objects
var TodoList = Backbone.Collection.extend({
model: Todo
});
var TodoView = Backbone.View.extend({
.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);
<!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>