User First Marketing Blog

User First Development Blog

Development vs. Marketing Blog

client login
  • Tobii Eye Tracking
  • Web Analytics 2.0
  • UI / UX Development

Blog posts for December, 2008

onUserExit - Execute Code When a User Leaves or Closes Your Website

Sunday, December 28th, 2008

onUserExit - Execute Code When a User Leaves or Closes Your WebsiteonUserExit is a jQuery plugin allows you to easily wire a function to execute when the user leaves your website. Internal website pages are filtered out, allowing the function to ONLY trigger when the window is closed or the user navigates to an external website.

I’m sure many of you have read about the javascript function onbeforeunload() or in jQuery $(window).unload() which triggers when a user leaves a page. Well the trouble is if the user clicks on the navigation within your website to go to a separate page from where you are currently (i.e. the user lands on the Home and then navigates to About), this triggers the event, which in this case you don’t want.

The way this is achieved is that upon the page completing load, I actually add click methods to all internal links within the page that execute a function called “userMovingWithinSite()”, which sets a boolean variable called “movingWithinSite” to true. So now, when the user clicks a navigation link or any link on the website WITHIN the website and the onbeforeunload event triggers, I can check to see if the user is actually leaving the site, or just navigating within it. If they are indeed leaving, then we execute your function!

See the full demo posted in our creations area.

Download Plugin
Version 1.0 - onUserExit js files + dependencies

Download the complete demo here.

The full project can also be found on the jQuery website in the plugins directory under onUserExit.

Please feel free to submit suggestions for changes to this plugin!

uRoute - jQuery User Route Tracking

Monday, December 22nd, 2008

uRoute - jQuery User Route TrackinguRoute is a jQuery plugin that allows you to easily wire a function to execute when the user leaves your website.

See the full demo posted in our creations area.

Download Plugin
Version 1.0 - uRoute js files + dependencies

Download the complete demo here.

The full project can also be found on the jQuery website in the plugins directory under uRoute.

Please feel free to submit suggestions for changes to this plugin!

Orbital Tooltip

Monday, December 1st, 2008

Orbital Tooltip - jQuery tooltip with more ease of use for developers The Orbital Tooltip came about because we wanted to see a more flexible tooltip that allowed for a larger range of flexibility with positioning of a tooltip. With the Orbital Tooltip you can choose to position the tooltip on any object in a 360 degrees around it. With multiple options for spacing & offset as well as styling, Orbital Tooltip stands head and shoulders above other jQuery tooltips.

See the full demo posted in our creations area.

Download version:
alpha 0.1 - js

Complete Demo
Download: zip

The full project can also be found on the jQuery website in the plugins directory under Orbital Tooltip.

Please feel free to submit suggestions for changes to this plugin!

Google Easy OnClick

Monday, December 1st, 2008

Orbital Tooltip Google Easy OnClick is designed to make the addition of OnClick code to a website simple and versatile. With a gamut of options, we guarantee you’ll find this jQuery plugin to be quite useful.

See the full demo posted in our creations area.

Download Plugin
Requires the jQuery URL Parser (included).

Download version:
alpha 0.8 - js files

The full project can also be found on the jQuery website in the plugins directory under Google Easy OnClick.

Please feel free to submit suggestions for changes to this plugin!

Pure jQuery Style Switcher

Monday, December 1st, 2008

Pure jQuery Style Switcher | Custom UI

Pure jQuery Style Switcher is a neat little script that allows you to set a couple styles up for your website and let your users choose from them, for a more personalized feel to your websites. See the full demo posted in our creations area.

Requires the Cookie Plugin for jQuery written by Klaus Hartl (included). Download the demo here.

Please feel free to submit suggestions for changes to this demo!

Enjoy!