Sunday, 15 June 2014

html - Javascript submenu duplicated -


I am doing a JavaScript vertical submenu, I am using yui tools but submenu has been repeated, I do not know

  YAHOO.util.Event.onContentReady ("menu_vertical", function () {var elMenu = new YAHOO.widget.Menu ("menu_vertical", {width: '550 px'}); L menu.Redder (); Lemenu.Show ();});  
  & lt; Link rel = "stylesheet" type = "text / css" href = "http://yui.yahooapis.com/2.3.0/ build / menu / property / skins / sam / menu.css" & gt; & Lt; Script type = "text / javascript" src = "http://yui.yahooapis.com/2.3.0/build/ Yahoo-dom-event / Yahoo-dom-event.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "http://yui.yahooapis.com/2.3.0/build/ container / container_core-min.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "http://yui.yahooapis.com/2.3.0/build/menu/ menu-min.js" & gt; & Lt; / Script & gt; & Lt; Div id = "menu_vertical" square = "yuimenu" & gt; & Lt; Div class = "beedi" & gt; & Lt; Ul class = "previous type" & gt; & Lt; Li class = "yuimenuitem" & gt; & Lt; A href = "#" & gt; MENU1 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li class = "yuimenuitem" & gt; & Lt; A href = "#" & gt; MENU2 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li class = "yuimenuitem" & gt; MENU3 & lt; Div id = "consectetuer" class = "yuimenu" & gt; & Lt; Div class = "beedi" & gt; & Lt; Ul & gt; & Lt; Li class = "yuimenuitem" & gt; & Lt; A href = "#" & gt; SUBMENU1 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li class = "yuimenuitem" & gt; & Lt; A href = "#" & gt; SUBMENU2 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li class = "yuimenuitem" & gt; & Lt; A href = "#" & gt; SUBMENU3 & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Li & gt; & Lt; Li class = "yuimenuitem" & gt; & Lt; A href = "#" & gt; MENU4 & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt;  

Link to you in your JSFiddle Your href and src tags are in the way, and these links and script tags should not be embedded inside a script because they are raw HTML here, but you still have problems.

You are trying to make plain HTTP references on an https connection, this is not secure, and JSFiddle and Stackoverflow will not allow you to do this

Also, your code Looks fine An example using my Google, it could be a good place to check whether your code is correct or not.

  YAHOO.util.Event.onContentReady ("menu_vertical", function () { Var elMenu = new YAHOO.widget.Menu ("menu_vertical", {width: '550 px'}); l menu.reader (); leneman.show ();});  
  & lt; Script src = "http://yui.yahooapis.com/2.3.0/build/yahoo-dom-event/yahoo-dom-event.js" & gt; & Lt; / Script & gt; & Lt; Script src = "http://yui.yahooapis.com/2.3.0/build/container/container_core-min.js" & gt; & Lt; / Script & gt; & Lt; Script src = "http://yui.yahooapis.com/2.3.0/build/menu/menu-min.js" & gt; & Lt; / Script & gt; & Lt; Link href = "http://yui.yahooapis.com/2.3.0/build/menu/assets/skins/sam/menu.css" rel = "stylesheet" /> & Lt; Div id = "menu_vertical" square = "yuimenu" & gt; & Lt; Div class = "beedi" & gt; & Lt; Ul class = "previous type" & gt; & Lt; Li class = "yuimenuitem" & gt; & Lt; A href = "#" & gt; MENU1 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li class = "yuimenuitem" & gt; & Lt; A href = "#" & gt; MENU2 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li class = "yuimenuitem" & gt; MENU3 & lt; Div id = "consectetuer" class = "yuimenu" & gt; & Lt; Div class = "beedi" & gt; & Lt; Ul & gt; & Lt; Li class = "yuimenuitem" & gt; & Lt; A href = "#" & gt; SUBMENU1 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li class = "yuimenuitem" & gt; & Lt; A href = "#" & gt; SUBMENU2 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li class = "yuimenuitem" & gt; & Lt; A href = "#" & gt; SUBMENU3 & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Li & gt; & Lt; Li class = "yuimenuitem" & gt; & Lt; A href = "#" & gt; MENU4 & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt; & Lt; / Div & gt;  


No comments:

Post a Comment