File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ $text-indent: 25px;
132132 border-top : $border ;
133133 background : transparent url (" /images/city-arrow.png" ) no-repeat right center ;
134134
135- & :hover {
135+ & :hover , & .highlight {
136136 background : {
137137 color : $green ;
138138 image : url (" /images/city-arrow-hover.png" ), url (" /images/green-gradient.png" );
Original file line number Diff line number Diff line change @@ -88,4 +88,18 @@ $(function(){
8888 } ) ;
8989
9090
91+ // Highlight a list item whenever the corresponding map marker is hovered.
92+ for ( i in markers ) {
93+ google . maps . event . addListener ( markers [ i ] , 'mouseover' , function ( ) {
94+ this . setIcon ( markerHover ) ;
95+ links . eq ( markers . indexOf ( this ) ) . addClass ( "highlight" ) ;
96+ } ) ;
97+ google . maps . event . addListener ( markers [ i ] , 'mouseout' , function ( ) {
98+ this . setIcon ( markerImage ) ;
99+ links . eq ( markers . indexOf ( this ) ) . removeClass ( "highlight" ) ;
100+ } ) ;
101+ }
102+
103+
104+
91105} ) ;
Original file line number Diff line number Diff line change 9393 text-decoration : none;
9494 border-top : 1px solid # e0e0e0 ;
9595 background : transparent url ("/images/city-arrow.png" ) no-repeat right center; }
96- .wrapper .cities ul li a : hover {
96+ .wrapper .cities ul li a : hover , . wrapper . cities ul li a . highlight {
9797 background-color : # 0fd482 ;
9898 background-image : url ("/images/city-arrow-hover.png" ), url ("/images/green-gradient.png" );
9999 background-repeat : no-repeat, repeat-x;
You can’t perform that action at this time.
0 commit comments