Skip to content

Latest commit

 

History

History
63 lines (45 loc) · 1.58 KB

README.md

File metadata and controls

63 lines (45 loc) · 1.58 KB

Callout is a balloon div that connects text, symbols, images to an element or a group of elements.

jCallout is jQuery implementation of callouts.

Here is a Live Demo (I'll be updating this page with further version releases)

Advantages

  • Easy to use and implement
  • Only CSS+JQuery implementation (no images required).
  • Customizable options

Usage

Basic:

    $('#testDiv').jCallout({message:"hello there. This is a test"});

With options:

    $('#testDiv').jCallout({
       message:"hello there. This is a test",
       position:"right", //other possible values- 'top', 'bottom', 'left'
       backgroundColor:"cyan", //hex code can be used
       textColor:"#fff",
       borderColor:"cyan"
    });

Click to open:

    var $testDiv = $('#testDiv');
    $testDiv.jCallout('initWithoutShow', { message: 'Hello world!' });
    $testDiv.click(function() { $testDiv.jCallout('show'); });

Supressing the "close" button:

    $testDiv.jCallout({ message: 'Hello world!', $closeElement: $('') });

Using the 'close' icon from JQuery UI:

    $testDiv.jCallout({
       message: tipText,
       $closeElement: $('<span/>', {'class':'ui-icon ui-icon-circle-close','style':'float: right'})
    })

Events:

    $('.test4').jCallout('hide');//hide callout associated with the selected element(s)
    $('.test4').jCallout('show');//show callout associated with the selected element(s)

Future releases will have more options and event handling