javascript - Problem with Display of jQuery Menu -


does not appear in the menu row, not sure how to call the CSS code. Apart from this, I want a warning to tell which menu item was clicked.

  & lt; Script type = "text / javascript" & gt; Click the function get_list () {$ ("# tab") (function () {$ (this). (Function () {warning (this);});}); & Lt; / Script & gt; & Lt; Style type = "text / css" & gt; #navbarID li {display: inline; } & Lt; / Style & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "tab" & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "Type 1.html" & gt; Type 1 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "type 2.html" & gt; Type 2 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "type 3.html" & gt; Type 3 & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

html should be something like that.

  & lt; Ul id = 'tab' & gt; & Lt; Li & gt; & Lt; A href = 'type1.html' & gt; Type 1 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = 'type2.html' & gt; Type 2 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = 'type 3.html' & gt; Type 3 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = 'type4.html' & gt; Type 4 & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt;  

CSS part can be:

  ul # tabs {list-style: none; } Ul # tab li {display: inline; }  

This is what you want on jQuery:

  $ ('ul # tabs li a'). Click (function () {Warning ('I was clicked!'); Return back;});  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -