Last active
July 19, 2016 18:49
-
-
Save adriatic/4708bf9f73a04c228903d61423396f04 to your computer and use it in GitHub Desktop.
Tooltip: basic use
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<require from="./basic-use.css"></require> | |
<div id="example" | |
ak-tooltip="k-filter: a; | |
k-width.bind: 120; | |
k-position: top; | |
k-widget.bind: tooltip"> | |
<div class="demo-section k-content wide"> | |
<div id="agglomerations"> | |
<a href="#" title="Canton - 26,300,000" ref="canton" id="canton"></a> | |
<a href="#" title="Jakarta - 25,800,000" id="jakarta"></a> | |
<a href="#" title="Mexico City - 23,500,000" id="mexico"></a> | |
<a href="#" title="Delhi - 23,500,000" id="delhi"></a> | |
<a href="#" title="Karachi - 22,100,000" id="karachi"></a> | |
<a href="#" title="New York - 21,500,000" id="newyork"></a> | |
<a href="#" title="Sao Paulo - 21,300,000" id="saopaolo"></a> | |
<a href="#" title="Mumbay/Bombay - 21,100,000" id="bombay"></a> | |
<a href="#" title="Los Angeles - 17,100,000" id="losangeles"></a> | |
<a href="#" title="Osaka - 16,800,000" id="osaka"></a> | |
<a href="#" title="Moscow - 16,200,000" id="moscow"></a> | |
</div> | |
</div> | |
</div> | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {inject} from 'aurelia-framework'; | |
import {TaskQueue} from 'aurelia-task-queue'; | |
@inject(TaskQueue) | |
export class BasicUse { | |
constructor(tq) { | |
this.tq = tq; | |
} | |
attached() { | |
this.tq.queueTask(() => { | |
this.tooltip.show($(this.canton)); | |
}); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.demo-section.k-content, | |
html.k-material .demo-section.k-content { | |
overflow: hidden; | |
padding: 0; | |
border: 0; | |
box-shadow: none; | |
} | |
#agglomerations { | |
position: relative; | |
width: 692px; | |
height: 480px; | |
margin: 0 auto; | |
background: url('https://demos.telerik.com/kendo-ui/content/web/tooltip/world-map.jpg') no-repeat 0 0; | |
} | |
#agglomerations a { | |
position: absolute; | |
display: block; | |
width: 12px; | |
height: 12px; | |
background-color: #fff600; | |
-moz-border-radius: 30px; | |
-webkit-border-radius: 30px; | |
border-radius: 30px; | |
border: 0; | |
-moz-box-shadow: 0 0 0 1px rgba(0,0,0,0.5); | |
-webkit-box-shadow: 0 0 0 1px rgba(0,0,0,0.5); | |
box-shadow: 0 0 0 1px rgba(0,0,0,0.5); | |
-moz-transition: -moz-box-shadow .3s; | |
-webkit-transition: -webkit-box-shadow .3s; | |
transition: box-shadow .3s; | |
} | |
##agglomerations a:hover { | |
-moz-box-shadow: 0 0 0 15px rgba(0,0,0,0.5); | |
-webkit-box-shadow: 0 0 0 15px rgba(0,0,0,0.5); | |
box-shadow: 0 0 0 15px rgba(0,0,0,0.5); | |
-moz-transition: -moz-box-shadow .3s; | |
-webkit-transition: -webkit-box-shadow .3s; | |
transition: box-shadow .3s; | |
} | |
#canton { top: 226px; left: 501px; } | |
#jakarta { top: 266px; left: 494px; } | |
#mexico { top: 227px; left: 182px; } | |
#delhi { top: 214px; left: 448px; } | |
#karachi { top: 222px; left: 431px; } | |
#newyork { top: 188px; left: 214px; } | |
#saopaolo { top: 304px; left: 248px; } | |
#bombay { top: 233px; left: 438px; } | |
#losangeles { top: 202px; left: 148px; } | |
#osaka { top: 201px; left: 535px; } | |
#moscow { top: 153px; left: 402px; } | |
#canton:hover, | |
#jakarta:hover, | |
#mexico:hover, | |
#delhi:hover, | |
#karachi:hover, | |
#newyork:hover, | |
#saopaolo:hover, | |
#bombay:hover, | |
#losangeles:hover, | |
#osaka:hover, | |
#moscow:hover { z-index: 10; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Aurelia KendoUI bridge</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.1.226/styles/kendo.common.min.css"> | |
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.1.226/styles/kendo.rtl.min.css"> | |
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.1.226/styles/kendo.default.min.css"> | |
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.1.226/styles/kendo.mobile.all.min.css"> | |
<script src="https://kendo.cdn.telerik.com/2016.1.226/js/jszip.min.js"></script> | |
</head> | |
<body aurelia-app="main"> | |
<h1>Loading...</h1> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.6/system.js"></script> | |
<script src="https://rawgit.com/aurelia-ui-toolkits/aurelia-kendoui-bundles/0.3.5/config2.js"></script> | |
<script> | |
System.import('aurelia-bootstrapper'); | |
</script> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function configure(aurelia) { | |
aurelia.use | |
.standardConfiguration() | |
.developmentLogging() | |
.plugin('aurelia-kendoui-bridge', kendo => kendo.pro()); | |
aurelia.start().then(a => a.setRoot()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment