Skip to content

dinglidingli/PixelHolder-jQuery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PixelHolder-jQuery

jQuery plugin for creating placeholder images based on the PixelHolder-RubyGem

Installation

Install via bower (or clone this git repository)

bower install pixelholder-jquery

Include jQuery and the plugin

<script src="jquery.js"></script>
<script src="pixelholder-jquery.js"></script>

Create <i></i> elements with appropriate data-tags (see example html file for usage examples)

<i class="pixelholder" data-width="300" data-height="600">PixelHolder</i>

Call PixelHolder

$(document).ready(function(){
  $(".pixelholder").pixelholder({
    showDimensions: false,
    background: "#09c",
    text: "#fff",
    width: "500px",
    height: "500px",
    gradientStart: "#09c",
    gradientEnd: "#9c0",
    debug: false
  });
});

Note: All options (excluding showDimensions) are used as default values if no data-value is applied to the <i></i> elements. showDimensions will override all placeholders and show dimensions on each placeholder.

About

jQuery plugin for creating placeholder images based on the PixelHolder-RubyGem

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published