iliasiovis / imgreplacer Goto Github PK
View Code? Open in Web Editor NEWGenerate img tags based on viewport width
Generate img tags based on viewport width
ImgReplacer - ver 0.1 This is a really simple and lightweight jQuery Plug in used to generate img tags based on the browser's viewport width - NOT the devices width. There are currently only 3 stages for img tag generation. You must provide 3 images based on width, this plug in does NOT generate images, it just selects the appropriate image based on the width of the browser window. Thus it's good for responsive websites. This is just an entry version, I might introduce more options etc. Installation: HTML - <div class="imgreplace" data-480="/img/img-480.jpg" data-767="/img/img-767.jpg" data-fallback="/img/img-767.jpg"></div> Script - $('div.imgreplace').imgreplacer(); The script will completely remove the div and replace it with an img tag that has the same class name as the div and the corresponding image source. created by Ilias Iovis This plug in was developed for https://github.com/prestarocket so credits go to him for the idea. http://www.iliasiovis.com @iliasiovis [email protected]
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.