diff options
| author | Neylor Ohmaly | 2014-02-27 23:08:39 -0300 |
|---|---|---|
| committer | Neylor Ohmaly | 2014-02-27 23:08:39 -0300 |
| commit | ba8432dc198541bef6fb253e97146f52505e780b (patch) | |
| tree | 6d276c2d3a19f40a52385e17ac076f21cb9c5b6c | |
| parent | 1a4e375236e0ec17ed1ab11e43cd950343310a82 (diff) | |
| download | nsPopover-ba8432dc198541bef6fb253e97146f52505e780b.tar.bz2 | |
Keep popover open while triggering element has mouse over it.
| -rw-r--r-- | bower.json | 2 | ||||
| -rw-r--r-- | example/index.css | 5 | ||||
| -rw-r--r-- | example/index.html | 23 | ||||
| -rw-r--r-- | example/nsPopover.js | 10 | ||||
| -rw-r--r-- | package.json | 2 | ||||
| -rw-r--r-- | src/nsPopover.js | 10 |
6 files changed, 44 insertions, 8 deletions
@@ -1,6 +1,6 @@ { "name": "nsPopover", - "version": "0.5.6", + "version": "0.5.7", "homepage": "https://github.com/nohros/nsPopover", "description": "Popover for angularjs library", "authors": [ diff --git a/example/index.css b/example/index.css index 49bae04..d641f03 100644 --- a/example/index.css +++ b/example/index.css @@ -40,9 +40,14 @@ article { float: left;
}
+article:after {
+ clear: both;
+}
+
h1 {
border-bottom: solid 1px #b9b8bb;
padding-bottom: .5em;
+ display:block;
}
a {
diff --git a/example/index.html b/example/index.html index dcf33fd..28ff4fe 100644 --- a/example/index.html +++ b/example/index.html @@ -53,6 +53,29 @@ Hover me
</a>
</article>
+
+ <h1> Tooltip </h1>
+ <article>
+ <p>
+ <b>nsPopover</b> could be used as a simple dropdown menu. You can use the built-in "ns-popover-list-theme" to
+ style the popover as a dropdown or create a custom one.
+ </p>
+
+ <button ns-popover
+ ns-popover-template="menu"
+ ns-popover-trigger="click"
+ ns-popover-theme="ns-popover-tooltip-theme"
+ ns-popover-timeout="1">
+ Click Me
+ </button>
+
+ <a ns-popover
+ ns-popover-template="menu"
+ ns-popover-trigger="mouseenter"
+ ns-popover-theme="ns-popover-tooltip-theme">
+ Hover me
+ </a>
+ </article>
</section>
</body>
diff --git a/example/nsPopover.js b/example/nsPopover.js index cfdb904..505fbba 100644 --- a/example/nsPopover.js +++ b/example/nsPopover.js @@ -140,9 +140,13 @@ });
});
- elm.on('mouseout', function() {
- hider_.hide($popover, options.timeout);
- });
+ elm
+ .on('mouseout', function() {
+ hider_.hide($popover, options.timeout);
+ })
+ .on('mouseover', function() {
+ hider_.cancel();
+ });
$popover
.on('mouseout', function(e) {
diff --git a/package.json b/package.json index 5408937..fa49190 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "author": "Neylor Ohmaly", "name": "nsPopover", - "version": "0.5.6", + "version": "0.5.7", "homepage": "http://nohros.com/nsPopover", "licenses": { "type": "MIT", diff --git a/src/nsPopover.js b/src/nsPopover.js index cfdb904..505fbba 100644 --- a/src/nsPopover.js +++ b/src/nsPopover.js @@ -140,9 +140,13 @@ });
});
- elm.on('mouseout', function() {
- hider_.hide($popover, options.timeout);
- });
+ elm
+ .on('mouseout', function() {
+ hider_.hide($popover, options.timeout);
+ })
+ .on('mouseover', function() {
+ hider_.cancel();
+ });
$popover
.on('mouseout', function(e) {
|
