Difference between revisions of "Team:ETH Zurich"
Line 226: | Line 226: | ||
} | } | ||
</style> | </style> | ||
+ | <script> | ||
+ | /* jQuery IE pseudo-selector hack */ | ||
+ | (function($) | ||
+ | { | ||
+ | |||
+ | var patterns = { | ||
+ | text: /^['"]?(.+?)["']?$/, | ||
+ | url: /^url\(["']?(.+?)['"]?\)$/ | ||
+ | }; | ||
+ | |||
+ | function clean(content) { | ||
+ | if(content && content.length) { | ||
+ | var text = content.match(patterns.text)[1], | ||
+ | url = text.match(patterns.url); | ||
+ | return url ? '<img src="' + url[1] + '" />': text; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | function inject(prop, elem, content) { | ||
+ | if(prop != 'after') prop = 'before'; | ||
+ | if(content = clean(elem.currentStyle[prop])) { | ||
+ | $(elem)[prop == 'before' ? 'prepend' : 'append']( | ||
+ | $(document.createElement('span')).addClass(prop).html(content) | ||
+ | ); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | $.pseudo = function(elem) { | ||
+ | inject('before', elem); | ||
+ | inject('after', elem); | ||
+ | elem.runtimeStyle.behavior = null; | ||
+ | }; | ||
+ | |||
+ | if(document.createStyleSheet) { | ||
+ | var o = document.createStyleSheet(null, 0); | ||
+ | o.addRule('.dummy','display: static;'); | ||
+ | o.cssText = 'html, head, head *, body, *.before, *.after, *.before *, *.after * { behavior: none; } * { behavior: expression($.pseudo(this)); }'; | ||
+ | } | ||
+ | |||
+ | })(jQuery); | ||
+ | </script> | ||
<script> | <script> |
Revision as of 07:10, 11 September 2015
- Project
- Modeling
- Lab
- Human
Practices - Parts
- About Us
The microbial beacon for cancer detection