tag:blogger.com,1999:blog-1131654430734024458.post3718242662168740002..comments2022-04-01T09:01:45.135-07:00Comments on How to: Change Css Class of li in ul onclickAnish Ranahttp://www.blogger.com/profile/09661595299689127133noreply@blogger.comBlogger16125tag:blogger.com,1999:blog-1131654430734024458.post-50101335722033423722016-06-01T01:46:48.648-07:002016-06-01T01:46:48.648-07:00add a class in style
.selected
{
background : ...add a class in style<br />.selected<br />{<br /> background : '#ff0000';<br />}<br /><br />and then apply this class to list item which you want to be selected by default as below:<br /><br />li class="selected" Anish Ranahttps://www.blogger.com/profile/09661595299689127133noreply@blogger.comtag:blogger.com,1999:blog-1131654430734024458.post-888891784836863122016-05-31T10:37:49.246-07:002016-05-31T10:37:49.246-07:00Thank you very helpful. How can I default one of ...Thank you very helpful. How can I default one of the menu items to be the 'selected' one on page load?Unknownhttps://www.blogger.com/profile/04686758058437965694noreply@blogger.comtag:blogger.com,1999:blog-1131654430734024458.post-37867186287656418782015-09-08T23:46:47.344-07:002015-09-08T23:46:47.344-07:00Thanks you!!!!!!!!! Thanks you!!!!!!!!! TestingMMORedirecthttps://www.blogger.com/profile/17907255258683396079noreply@blogger.comtag:blogger.com,1999:blog-1131654430734024458.post-5410904757102537512015-06-03T05:55:44.817-07:002015-06-03T05:55:44.817-07:00very simple code, working finevery simple code, working fineAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-1131654430734024458.post-44363086052417493032014-07-06T21:56:17.007-07:002014-07-06T21:56:17.007-07:00http://anishrana.blogspot.in/2014/05/change-css-cl...http://anishrana.blogspot.in/2014/05/change-css-class-of-li-in-ul-onclick_16.html<br />here is the linkAnish Ranahttps://www.blogger.com/profile/09661595299689127133noreply@blogger.comtag:blogger.com,1999:blog-1131654430734024458.post-30512857334794024792014-07-06T21:43:03.321-07:002014-07-06T21:43:03.321-07:00Hi friend helme please
look this
(Change Css Cla...Hi friend helme please<br />look this <br /><br />(Change Css Class of li in ul onclick - Menu Linked Pages<br />Reply)<br /><br />no found<br />onclick not kept in each html 1,2,3Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1131654430734024458.post-48559205701458546232014-05-16T19:03:38.573-07:002014-05-16T19:03:38.573-07:00Hello Anand..
For your solution you need to write ...Hello Anand..<br />For your solution you need to write script on each page that are linked to your menu.<br /><br />Check below topic<br /><br />Change Css Class of li in ul onclick - Menu Linked PagesAnish Ranahttps://www.blogger.com/profile/09661595299689127133noreply@blogger.comtag:blogger.com,1999:blog-1131654430734024458.post-4347037515556527212014-05-16T03:36:41.305-07:002014-05-16T03:36:41.305-07:00hello Anish Rana when I'm using this not worki...hello Anish Rana when I'm using this not working so please tell me the exact answer I'm waiting for your response<br /><br />-----a-href="page.html"...anand choudharyhttps://www.blogger.com/profile/12954936842499647288noreply@blogger.comtag:blogger.com,1999:blog-1131654430734024458.post-63893759314172149652014-05-02T08:01:10.626-07:002014-05-02T08:01:10.626-07:00check topic
Change Css Class of li in ul onclick ...check topic<br /><br />Change Css Class of li in ul onclick with Query StringAnish Ranahttps://www.blogger.com/profile/09661595299689127133noreply@blogger.comtag:blogger.com,1999:blog-1131654430734024458.post-88324999694154857562014-05-02T00:41:53.403-07:002014-05-02T00:41:53.403-07:00thanks for the quick reply,
can u show an example ...thanks for the quick reply,<br />can u show an example using the query string.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1131654430734024458.post-67626795336486032912014-05-01T09:33:56.047-07:002014-05-01T09:33:56.047-07:00Here you go...
but i have used # instead of ? beca...Here you go...<br />but i have used # instead of ? because this become a query string and the page reloads and as you know javascript is static so it again loads with the page load. So you can use as in the below topic<br /><br />Change Css Class of li in ul onclick with Anchor Tag<br /><br />Or if you want to use ? then you have to write the code on each page by getting the url and set the button clickedAnish Ranahttps://www.blogger.com/profile/09661595299689127133noreply@blogger.comtag:blogger.com,1999:blog-1131654430734024458.post-83114116991313725522014-05-01T06:29:06.703-07:002014-05-01T06:29:06.703-07:00Hi Anish,
usefull code,
but if i add this ------...Hi Anish,<br />usefull code,<br />but if i add this ------- a href ="?page=one">home<a ------<br /><br />The code will not work , do you have a solution to this?<br />plz reply if you have a solution.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1131654430734024458.post-90618489685963506702014-01-03T18:08:32.843-08:002014-01-03T18:08:32.843-08:00I am a begginer and was searching internet for a l...I am a begginer and was searching internet for a long time to find this. Thanks a lot.Habi Harishttps://www.blogger.com/profile/12011110095001331745noreply@blogger.comtag:blogger.com,1999:blog-1131654430734024458.post-30640038276562229582013-06-11T01:35:56.712-07:002013-06-11T01:35:56.712-07:00Thanx....Very useful code.Thanx....Very useful code.Anonymoushttps://www.blogger.com/profile/06869503336857394559noreply@blogger.comtag:blogger.com,1999:blog-1131654430734024458.post-85514396810267014172013-06-11T01:34:48.007-07:002013-06-11T01:34:48.007-07:00very useful codevery useful codeAnonymoushttps://www.blogger.com/profile/06869503336857394559noreply@blogger.comtag:blogger.com,1999:blog-1131654430734024458.post-26104052335909115362012-07-03T04:43:11.430-07:002012-07-03T04:43:11.430-07:00hai baiya its nice..hai baiya its nice..rengarajuhttp://phpbible.wordpress.comnoreply@blogger.com