NiftyImages JavaScript SDK

The NiftyImages JavaScript SDK works in all major browsers, giving you and your users intuitive tools for creating dynamic images and countdown timers. The widget can be embedded in any website with just a few lines of JavaScript, adding simple yet powerful tools to any ESP, designer or image editor. This widget is optimized for the latest versions of Chrome, Firefox, Safari, and Internet Explorer (IE 10).

       

Widget Boilderplate

Integrating NiftyImages in your website can be as simple as copy and paste! Use the following boilerplate to get started.

<!-- Load NiftyImages Code -->
<script type="text/javascript" src="https://widget.niftyimages.com/js/niftywidget.js"></script>

<!-- Instantiate Widget -->
<script type='text/javascript'>
var niftyWidget = new NiftyImages.NiftyWidget({
    widgetKey: 'YOUR WIDGET KEY',           // Required
    userID: 'User ID',                      // Required
    imageName: 'Image Name',                // Required
    appendTo: '',
    theme: 'dark',
    variable: '{FIRSTNAME}',
    fields: [
        ['First Name', '|*FNAME*|'],
        ['Last Name', '|*LNAME*|']
    ],
    onSave: function(newURL) {
        alert(newURL);
    },
    onError: function(errorObj) {
        alert(errorObj.message);
    }
});
</script>
<!-- Personalize an imaage -->
<button type='button' onclick="niftyWidget.personalize('http://widget.niftyimages.com/imgs/ex/1.jpg');">Personalize</button>
<!-- Create a timer -->
<button type='button' onclick="niftyWidget.timer();">Create Timer</button>