Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hakim-d/floating-text-ad
An Ad Unit for beautifully displaying Text Ads. Introduce an image url, a title and a little description to go!
https://github.com/hakim-d/floating-text-ad
Last synced: 29 days ago
JSON representation
An Ad Unit for beautifully displaying Text Ads. Introduce an image url, a title and a little description to go!
- Host: GitHub
- URL: https://github.com/hakim-d/floating-text-ad
- Owner: hakim-d
- Created: 2014-04-27T23:32:13.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-04-26T15:31:26.000Z (over 1 year ago)
- Last Synced: 2023-09-07T16:13:23.596Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Floating Text Ad
================An Ad Unit for beautifully displaying Text Ads, introduce an image url, a title and a little description to go!
Usage
``` javascript
// image width, image height, image url
floatingTextAd.setImage(180, 135, "http://hakim.ma/labs/floating-text-ad/thumb.jpg");
// title, description
floatingTextAd.setText("Flying Dodo", "Get as far as you can before you run out of fuel.");
// click url, open target
floatingTextAd.setClickUrl("http://www.doubleduck.co/games/flying-dodo/", "_blank");
// show Ad
floatingTextAd.init();
```Options
Show the Ad after a time delay (milliseconds) (default: "1000")
``` javascript
// 2 seconds delay
floatingTextAd.init(2000);
```Description text length
``` javascript
// description length is 15 words
floatingTextAd.setText("Flying Dodo", "Get as far as you can before you run out of fuel.", 15);
```Ad Unit theme color
``` javascript
floatingTextAd.setColor("#808000");
```Change the call-to-action button text (default: "Play Now")
``` javascript
// "Watch Now", "Jouez", "Spielen", "إلعب الآن"…
floatingTextAd.setCTA("Watch Now");
```Label text (default: "HOT!")
``` javascript
// "NEW!", "SALE"…
floatingTextAd.setLabel("NEW!");
```Frequency capping (hours) (Default: "None")
Set a number of hours this Ad Unit should not appear again when the user hits the Close button.``` javascript
// The Ad shows once per 12 hours
floatingTextAd.setCapping(12);
```