Skip to content

Commit

Permalink
Merge tag 'v1.1.0'
Browse files Browse the repository at this point in the history
Refactor! Wrap all APIs into Object and attach to DOM as .data('flip-model')
  • Loading branch information
nnattawat committed May 20, 2016
2 parents 80a08e7 + 6180c86 commit 20cc1f8
Show file tree
Hide file tree
Showing 11 changed files with 629 additions and 506 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/node_modules/
/bower_components/
npm-debug.log
*.swp
16 changes: 9 additions & 7 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
{
"boss": true,
"browser": true,
"curly": true,
"eqeqeq": false,
"devel": true,
"eqeqeq": true,
"eqnull": true,
"es3": true,
"esversion": 5,
"expr": true,
"immed": true,
"newcap": false,
"noarg": true,
"onevar": true,
"quotmark": false,
"shadow": true,
"trailing": true,
"undef": true,
"unused": true,
"newcap": false,
"browser": true,
"shadow": true,
"devel": true,
"freeze": true,
"maxstatements": 30,

"globals": {
"jQuery": false
}
}
}
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
language: node_js
node_js:
- '0.10'
before_install:
- npm install -g grunt-cli bower
install:
- npm install
- bower install
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![Build Status](https://travis-ci.org/nnattawat/flip.svg?branch=master)](https://travis-ci.org/nnattawat/fixedBG)
# jQuery Flip <sub><sup>v1.0.20</sup></sub>

**A lightweight jQuery plugin to create 3d flip animation.**
Expand Down
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "flip",
"version": "1.0.20",
"version": "1.1.0",
"dependencies": {
"jquery": "~2.0"
},
"devDependencies": {
"jquery": "~2.0"
},
"main": [
"src/flip.js"
"dist/jquery.flip.js"
],
"ignore": []
}
18 changes: 10 additions & 8 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,27 @@
height: 400px;
margin: 20px;
}
.front, .back {
.front, .back, .other-front, .other-back {
border: 2px gray solid;
padding: 10px;
}
.front {
.front, .other-front {
background-color: #ccc;
}
.back {
.back, .other-back {
background-color: red;
}
</style>
</head>
<body>
<div id="card-1" class="card">
<div class="front">
<div class="other-front">
Front: Cursus aliquet mus et sociis, placerat adipiscing a placerat magnis integer nisi lacus in, turpis porttitor? Lectus nunc dis in porta, montes lacus. Tortor. Pid sit nisi eu nec aenean.
</div>
<div class="back">
<div class="other-back">
<a href="http://google.com">link</a>
Back: Dolor scelerisque ridiculus! Mus? Augue, montes, montes proin rhoncus vel a parturient dapibus eros? Penatibus nascetur. In turpis nisi elementum nascetur habitasse augue egestas, in ac rhoncus odio porttitor turpis.
Back: Dolor scelerisque ridiculus! Mus? Augue, montes, montes proin rhoncus vel a parturient dapibus eros? Penatibus nascetur. In turpis nisi elementum nascetur habitasse augue egestas, in ac rhoncus odio porttitor turpis.
</div>
</div>

Expand All @@ -47,13 +48,14 @@

<script type="text/javascript">
$(function(){
// $(".card").flip();

$("#card-1").flip({
axis: "y", // y or x
reverse: false, // true and false
trigger: "hover", // click or hover
speed: 1000
speed: 1000,
front: $('.other-front'),
back: $('.other-back'),
autoSize: false
});
$("#card-2").flip({
axis: "x",
Expand Down
Loading

0 comments on commit 20cc1f8

Please sign in to comment.