javascript - Active or Focus Effect on HTML< Ul> tag -
here sample ul tag:
<ul style="list-style-type:none; padding:5px ; border:solid 1px #666666;"> <li>i wating </li> <li>i wating </li> <li>i wating </li> <li>i wating </li> <li>i wating </li>
is there way css or javascript set ul border different color when clicked or active ? , when click in different place effect gone . trying make , search not result came out .
js fiddle demo: http://jsfiddle.net/saifrahu28/yff6p/
no problem if there jquery solution .
building off of fangels answer....
you wouldn't want hard code list style, otherwise have use !important in css. change tabindex ul , add class it. when has focus, change ul:focus item.
html
<ul tabindex="1" class="thislist" > <li>i wating </li> <li>i wating </li> <li>i wating </li> <li>i wating </li> <li>i wating </li> </ul>
css
ul:focus { outline:solid 1px green; } .thislist { list-style-type:none; padding:5px ; border:solid 1px #666666; }
Comments
Post a Comment