Team:ETH Zurich/project/overview/grid
From 2014.igem.org
(Difference between revisions)
Line 3: | Line 3: | ||
<html> | <html> | ||
- | < | + | <title>Demo</title> |
- | <link rel="stylesheet" href=" | + | <link rel="stylesheet" href="C:\Users\Claude\Desktop\css\ex.css" type="text/css"> |
- | <script src="http://www.dyn-web.com/js/dw_tooltip_c.js" type="text/javascript"></script> | + | <style type="text/css"> |
+ | /* optional styles */ | ||
+ | div#tipDiv { | ||
+ | background-color:#E1E5F1; | ||
+ | border:1px solid #667295; | ||
+ | padding:4px; | ||
+ | width:200px; | ||
+ | } | ||
+ | |||
+ | </style> | ||
+ | <script src="http://www.dyn-web.com/code/tooltips/js/dw_tooltip_c.js" type="text/javascript"></script> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
- | / | + | /* 2 functions that can be used to vary tooltip width according to image width: |
- | + | dw_Tooltip.wrapImageToWidth and dw_Tooltip.wrapToWidth | |
- | + | See www.dyn-web.com/code/tooltips/documentation2.php#wrapFn for info */ | |
dw_Tooltip.defaultProps = { | dw_Tooltip.defaultProps = { | ||
- | supportTouch: true, | + | //supportTouch: true, // set false by default |
- | + | wrapFn: dw_Tooltip.wrapImageToWidth | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | dw_Tooltip. | + | |
} | } | ||
+ | // Problems, errors? See http://www.dyn-web.com/tutorials/obj_lit.php#syntax | ||
dw_Tooltip.content_vars = { | dw_Tooltip.content_vars = { | ||
- | + | L1: { | |
- | img: '/ | + | img: 'https://static.igem.org/mediawiki/2014/d/d9/ETH_Zurich_GridGlowing.png', |
- | + | w: 80, // width of image | |
- | + | h: 24 // height of image | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | w: | + | |
- | h: | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | } | |
- | + | } | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | </script> | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | + | <h1>Images in the Tooltip</h1> | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | |||
- | |||
- | |||
- | |||
- | |||
<ul> | <ul> | ||
- | <li> | + | <li><a href="#" class="showTip L1">Link 1</a></li> |
- | + | ||
- | + | ||
- | + | ||
</ul> | </ul> | ||