File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 30
30
]]> </code >
31
31
</pre >
32
32
<p >Click, and watch as the magic happens!
33
- <iframe src =" /resources/hashtag/example1.html" style =" width:100%;height:90px;border:0px" ></iframe >
33
+ <iframe id = " hashtagIframe " src =" /resources/hashtag/example1.html" style =" width:100%;height:90px;border:0px" ></iframe >
34
34
</p >
35
35
</longdesc >
36
36
<added >1.0</added >
Original file line number Diff line number Diff line change 47
47
</ head >
48
48
< body >
49
49
< p id ="nav ">
50
- < a href ="/resources/hashtag/example1.html #test1 "> test 1</ a >
51
- < a href ="/resources/hashtag/example1.html #test2 "> test 2</ a >
52
- < a href ="/resources/hashtag/example1.html #test3 "> test 3</ a >
53
- < a href ="/resources/hashtag/example1.html #test4 "> test 4</ a >
50
+ < a href ="#test1 " class =" hashExLink "> test 1</ a >
51
+ < a href ="#test2 " class =" hashExLink "> test 2</ a >
52
+ < a href ="#test3 " class =" hashExLink "> test 3</ a >
53
+ < a href ="#test4 " class =" hashExLink "> test 4</ a >
54
54
</ p >
55
55
< script >
56
56
$ ( function ( ) {
71
71
// Since the event is only triggered when the hash changes, we need to trigger
72
72
// the event now, to handle the hash the page may have loaded with.
73
73
$ ( window ) . hashchange ( ) ;
74
+
75
+ // To change src attribute of parent iframe element
76
+ $ ( . hashExLink ) . on ( 'click' , function ( ) {
77
+ Top . document . getElementById ( 'hashtagIframe' ) . location . href = '/resources/hashtag/example1.html' + $ ( this ) . href ;
78
+ } ) ;
74
79
} ) ;
75
80
</ script >
76
81
</ body >
You can’t perform that action at this time.
0 commit comments