Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
jQuery plugin for flashing messages in the browser title bar (i.e. chat message alerts)
JavaScript
branch: master

This branch is 1 commit ahead of heyman:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
example
LICENSE
README.markdown
jquery.titlealert.js

README.markdown

jquery-titlealert

Flashes the page title with a custom message.

Example usage

$.titleAlert("Hello World!", {
    requireBlur:true,
    stopOnFocus:true,
    duration:10000,
    interval:500,
    autoResetTitle:false,
    endStateTitle:"Alerting complete!"
});

Flash title bar with text "Hello World!", if the window doesn't have focus, for 10 seconds or until window gets focused, with an interval of 500ms. When flashing is complete, set the title bar to "Alerting complete!"

Parameters and Options

jQuery.titleAlert(message, options)
message A string the message that should be flashed in the browser title.
options JavaScript object containing options
name default description
interval 500 The flashing interval in milliseconds.
originalTitleInterval null Time in milliseconds that the original title is diplayed for. If null the time is the same as interval.
duration 0 The total lenght of the flashing before it is automatically stopped. Zero means infinite.
stopOnFocus true If true, the flashing will stop when the window gets focus.
stopOnMouseMove false If true, the flashing will stop when the document recieves a mousemove event (i.e. when the user moves the mouse over the document area, regardless of what window is active).
requireBlur false Experimental. If true, the call will be ignored unless the window is out of focus. Known issues: Firefox doesn't recognize tab switching as blur, and there are some minor IE problems as well.
autoResetTitle true If true, the title will be set at the end of the alert flash loop.
endStateTitle document.title The value of the title bar after alerting has been completed.

License

MIT License

Something went wrong with that request. Please try again.