SHOW:
|
|
- or go back to the newest paste.
1 | <!DOCTYPE html> | |
2 | <html> | |
3 | <head> | |
4 | <meta charset="utf-8"> | |
5 | <meta content="width=device-width" name="viewport"> | |
6 | <link href="css-min.css" rel="stylesheet"> | |
7 | ||
8 | <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script> | |
9 | <script type="text/javascript"> | |
10 | ||
11 | $(document).ready(function() { | |
12 | test = loadUrl('http://www.fh-koeln.de/hochschule/leichtere-bauteile-fuer-flugzeuge-autos-und-windraeder-fachhochschule-koeln-forscht-zu-sensortechnik-in-faserverbundkunststoffen_11489.php'); | |
13 | }); | |
14 | ||
15 | var loadUrl = function (url) { | |
16 | var base = 'http://www.fh-koeln.de'; | |
17 | ||
18 | $('#content').load(url + ' article', function() { | |
19 | $('img').each(function() { | |
20 | $(this).attr('src', base + $(this).attr('src')); | |
21 | }); | |
22 | $('a').each(function () { | |
23 | href = $(this).attr('href'); | |
24 | ||
25 | if (href.substring(0, 4) != 'http') { | |
26 | href = base + href; | |
27 | } | |
28 | ||
29 | $(this).attr('link', href); | |
30 | $(this).attr('target', '_blank'); | |
31 | $(this).removeAttr('href'); | |
32 | ||
33 | $(this).bind('click', function() { | |
34 | return $(this).attr('link'); | |
35 | }); | |
36 | }); | |
37 | }); | |
38 | }; | |
39 | ||
40 | </script> | |
41 | </head> | |
42 | <body> | |
43 | <div id="content" class="article"></div> | |
44 | </body> | |
45 | </html> |