chinchang / cta.js Goto Github PK
View Code? Open in Web Editor NEWAnimate your 'action-to-effect' paths
Home Page: https://kushagra.dev/lab/ctajs/
License: MIT License
Animate your 'action-to-effect' paths
Home Page: https://kushagra.dev/lab/ctajs/
License: MIT License
This looks cool...
I would like to popup modal when user navigates to another page, is that possible? Let's say in page-1 i have a tile (just like in your demo) and when user clicks on it, it goes to page-2 (which has same color and some other stuff, just like in demo) when url changes, from localhost:3000/#/page-1
to localhost:3000/#/page-2
. Will this work? Didn't tested, hope i can be useful for web applications
Add some basic tests for the library.
Flexbox in the middle part would be great (the colored boxes that open/animate section) -- really interested in flexbox
PROBLEM: when the browser is made small the boxes all cram together.
Question: Is there a way to have them align all in a row when browser LARGE -- ie. setting a width i guess?
SO: then when the browser is small they would be one above the other.
Can you help us all with this? Grid needed i think.
whatever happens great thanks!
Don
it would be great if cta works with ionicframework since cta has an attractive animation features. Also this follows material design concepts I have tried integrate it with ionic material and the animation didnt work because it appending run time element into document body (ionic uses document with ). I had to modify the library. If you can give the parent element when declaring click events that would be great.
Thanks
This animation is awesome , but it is not compatible with bootstrap.(especially the closing part)
The AMD export code should be wrapped in a function like so:
define(function () {
return cta;
});
Currently the module causes error with AMD loader like RequireJS because cta() is run immediately upon load.
After clicking the blocks nothing shows up. Also I cannot close it back.
Thanks.
LIbrary should work in atleast latest versions of safari and firefox too.
Hi, i tried to put why i'm getting errors in cta code!
AM
Yeah, CTA is supporting Chrome, Safari and Firefox.
Do You know anything about Vivaldi browser? It's so good browser developed by Vivaldi Foundation. Vivaldi is supporting CTA.js too, can You add info about that?
Hello Gour,
First thanks a lot for your awesome code, anyway I face to a strange issue, while using key event instead of mouse :
Strange ....
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>cta.js - Animate your 'action-to-effect' paths!</title>
<meta name="author" content="Kushagra Gour">
<meta name="description" content="Animate any element onto another element.">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.e1 {
position: absolute;
background: #F90;
border-radius: 50%;
margin-left: -10px;
margin-top: -10px;
left: 10px;
top: 430px;
width: 20px;
height: 20px;
}
.e2 {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
padding: 40px;
background: #EA006F;
color: white;
z-index: 1;
transition: 200ms ease;
}
.hide {
visibility: hidden;
opacity: 0;
}
</style>
</head>
<body>
<div class="e1"></div>
<div class="e2 hide"></div>
<script src="src/cta.js"></script>
<script>
addEventListener('keyup', function(e) {
if (e.which === 27) {
var e1 = document.querySelector('.e1'),
e2 = document.querySelector('.e2');
e1.classList.add('hide');
cta(e1, e2, {
duration: 3
},
function() {
e2.classList.remove('hide');
});
}
}, false);
</script>
</body>
</html>
Issue on JSBin: http://jsbin.com/sebalilana
Hello,
how can I subtract an elementheight from the modal?
Kind regards.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.