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 3030 ]]> </code >
3131 </pre >
3232 <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 >
3434 </p >
3535 </longdesc >
3636 <added >1.0</added >
Original file line number Diff line number Diff line change 4747</ head >
4848< body >
4949 < 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 >
5454 </ p >
5555 < script >
5656 $ ( function ( ) {
7171 // Since the event is only triggered when the hash changes, we need to trigger
7272 // the event now, to handle the hash the page may have loaded with.
7373 $ ( 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+ } ) ;
7479 } ) ;
7580 </ script >
7681</ body >
You can’t perform that action at this time.
0 commit comments