Commits

Christoffer Niska  committed 9bae4c7

Minor improvements to the BootTwipsy widget.

  • Participants
  • Parent commits 0b395e6

Comments (0)

Files changed (2)

File assets/js/jquery.boottwipsy.js

 	 * @type Object
 	 */
 	var defaults = {
-		placement: 'above'
+		placement: 'above',
+		inEvent: 'mouseenter',
+		outEvent: 'mouseleave',
+		live: false
 	};
 
 	/**
 						visible: false
 					});
 
-					element.bind( 'mouseover', function( event ) {
+					var fn = settings.live ? 'live' : 'bind';
+
+					element.fn( settings.inEvent, function( event ) {
 						methods.show(element);
 					});
 
-					element.bind( 'mouseout', function( event ) {
+					element.fn( settings.outEvent, function( event ) {
 						methods.hide(element);
 					});
 				}

File widgets/BootTwipsy.php

 	/**
 	 * @property string the CSS selector to use for selecting the twipsy elements.
 	 */
-	public $selector = '.twipsy';
+	public $selector = 'a[title]';
 	
 	/**
 	 * Initializes the widget.