Skip to content

randomknowledge/jquery-responsivetext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jQuery Responsivetext

a responsive text plugin

jQuery Responsivetext is a plugin that replaces text (and markup) inside nodes depending on the browser window size.

Usage

<h3>
     Some very long text that will be replaced on smaller browser sizes
     <span class="responsive-text">
         <span data-for="ipad">Text for iPad</span>
         <span data-for="iphone">Text for iPhone</span>
         <span data-for="bigscreen">Text can also <strong>contain markup</strong></span>
     </span>
</h3>
$.responsiveText('start', {
    selector: '.responsive-text',
    sizes: {
        'ipad': [1024, 481],
        'iphone': [480, 320],
        'bigscreen': [Number.POSITIVE_INFINITY, 1280]
    },
    delay: 300
});
.responsive-text {
	display: none;
	speak: none;
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published