Comments (7)
+1
from antimoderate.
+1
from antimoderate.
That's exactly what I'm looking for too, but how - this works by crawling the DOM and replacing the contents of an tag + the animation, right?
Can js crawl a separate CSS document and do the same?
from antimoderate.
@huwd yeah right now it replaces the src attribute, a similar thing would need to be done but for background image. the code would just set el.style.backgroundImage to what it would have set to src.
from antimoderate.
:) Thought I'd try and do a pull request but after some fiddling on codepen I realise I'm outta my depth.js
Is there any chance the solution you describe above could also work at passing in alternative sass variables? Using bourbon neat currently got my $tiny-res
and $full-res
setup, just need the javascript to swap em and trigger your animation
from antimoderate.
Ahah well thanks for trying 🐃
It definitely should if the js was implemented for bg image. I guess instead of using a data attribute then, it !might! make sense to pop the tiny-res into their own css classes and have the js read the tiny-res from them. That would also have the added benefit that you could cache that file for the images which would be pretty neat.
from antimoderate.
+1
from antimoderate.
Related Issues (15)
- Errors in example
- support HOT 1
- support (plugin) HOT 7
- Expected behavior happening in reverse. HOT 10
- Publish demo on github pages
- Info about the license unclear HOT 1
- Support
- Is this just for <img/>?
- Large image loads, small image(very briefly), then large image again
- Browser Compatibility HOT 3
- Two Requests HOT 4
- better readme / usage guide HOT 3
- Add bower integration HOT 1
- img srcset support (question) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from antimoderate.