How do you add url item props in a menu after the first li element. I cant seem to get google to pick up my next item props after the first menu list.
<li itemtype="http://schema.org/LocalBusiness" id="main"> <a> home</a>
<ul id=" subnav" =""="">
<li> <a itemprop="url" href="">Item 1</a>
</li>
<li><a itemprop="url" href="">Item 2</a>
</li>
<li><a itemprop="url" href="">Item 3</a>
</li>
</ul>
</li>
<li id="two">
<a>hello</a>
<ul id="subnav1">
<li>Menu 2
</li>
<li><a itemprop="url" href=""> Item 4 Not being picked up</a>
</li>
</ul>
</li>
Related
Guys i have a couple of unclearities.
Am optimising my website for google and i start to use strured data.
First question:
My site have main menu with sub menu and that sub manues have own sub menues etc...
Does all sub menues also need to have declared itemscope itemtype="http://www.schema.org/SiteNavigationElementor just parent need to have?
Check my example below:
<ul itemscope itemtype="http://www.schema.org/SiteNavigationElement">
<li itemprop="name"><a itemprop="url" href="#">Car Parts</a></li>
<li itemprop="name">
<a itemprop="url" href="#">Car Models</a>
<ul itemscope itemtype="http://www.schema.org/SiteNavigationElement" class="dropdown"> <!-- THIS -->
<li itemprop="name"><a itemprop="url" href="#">Sub menu</a></li>
</ul>
</li>
</ul>
Or just need like this
<ul itemscope itemtype="http://www.schema.org/SiteNavigationElement">
<li itemprop="name"><a itemprop="url" href="#">Car Parts</a></li>
<li itemprop="name">
<a itemprop="url" href="#">Car Models</a>
<ul class="dropdown"> <!-- THIS -->
<li itemprop="name"><a itemprop="url" href="#">Sub menu</a></li>
</ul>
</li>
</ul>
Second question
<li itemprop="name"> value of itemprop is name. Does this need to stay with name value or i need to change name => Car Models ?
<a itemprop="url"> does url need to change with my www.example.com/category or just leave url?
Thanks
<ul itemscope itemtype="http://www.schema.org/SiteNavigationElement">
<li itemprop="name"><a itemprop="url" href="#">Car Parts</a></li>
<li class="dropdown">
<a class="dropdown-toggle" href="#">Car Models</a>
<ul class="dropdown-menu">
<li class="nav-item" itemprop="name">
<a class="dropdown-item nav-link" itemprop="url" href="https://stackoverflow.com">stackoverflow</a>
</li>
</ul>
</li>
</ul>
Itemprop should be defined on the navigation items and not the dropdown containers. You also do not need to repeat the schema declaration nor do you need to redeclare the itemscope.
Also, itemprop="" is defining what type of property the dom item is defining. So it should stay as "name" and "url".
here is a Mozilla article explaining itemprop: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/itemprop
<li class="parent">
<a target="_blank" href="">For Doctors
<i class="icon-chevron-small-down"></i>
</a>
<ul class="submenu">
<li>
Video Consultation
</li>
<li>
<a target="_blank" href="http://www.geniedocorbit.com">Orbit</a>
</li>
<li>
CMS
</li>
</ul>
</li>
It is not working in any browser the strange thing is even while pressing CTRL+button it's not opening in new tab
I would like to get some advice on WAI-ARIA markup I have added to my paginated post navigation.
Does this look correct, am I missing anything?
Should anything be added/removed to the current page link (#2)?
Also, curious on my "Page Count" and "View All" sections what if anything can be added to make it more ARIA-friendly.
<nav role="navigation" class="post-navigation">
<ul role="menubar" class="pagination">
<!-- Page Count -->
<span class="page-count">Page 2 of 4 </span>
<li aria-label="Previous">
<a role="menuitem" aria-posinset="1" data-pagenum="1" href="#">
<span aria-hidden="true">«</span>
</a>
</li>
<li>
<a role="menuitem" aria-posinset="1" data-pagenum="1" href="">1</a>
</li>
<li class="active">
<span role="menuitem" aria-posinset="2">2</span>
</li>
<li>
<a role="menuitem" aria-posinset="3" data-pagenum="3" href="#">3</a>
</li>
<li>
<a role="menuitem" aria-posinset="4" data-pagenum="4" href="#">4</a>
</li>
<li aria-label="Next">
<a role="menuitem" aria-posinset="3" data-pagenum="3" href="#">
<span aria-hidden="true">»</span>
</a>
</li>
<!-- View All link handing -->
<li aria-label="View All">
<a role="menuitem" href="#?viewall">View All</a>
</li>
</ul>
</nav>
I'm trying to create spaced tabs. I want about 6-8 of them running across the width of the screen, each with equal distance apart from each other. I also need them to have dropdown ability on hover.
Initially I went with Bootstrap 3 for quick and fast tabs. However, I can't seem to get them to space equally across the width of the page.
Alternatively, I found this awesome snippet of code which is pure css. However, I'm far from a css wizard and making a pure dropdown like the tabs would take me a long time.
Anyone know a solution to the bootstrap 3 problem of spacing or know where I can get a pure css dropdown solution? Bootstrap 3 code below, pure css in jsfiddle link
Thanks!
Code:
<ul class='nav nav-tabs'>
<li class='dropdown'>
<a class='dropdown-toggle' data-toggle='dropdown' href='#'>Test 1</a>
<ul class='dropdown-menu'>
<li><a href='#'>test 1</a></li>
</ul>
</li>
<li class='dropdown'>
<a class='dropdown-toggle' data-toggle='dropdown' href='#'>Test 2</a>
<ul class='dropdown-menu'>
<li><a href='#'>test 2</a></li>
</ul>
</li>
<li class='dropdown'>
<a class='dropdown-toggle' data-toggle='dropdown' href='#'>Test 3</a>
<ul class='dropdown-menu'>
<li><a href='#'>test 3</a></li>
</ul>
</li>
</ul>
You can enclose your code inside a div with container-fluid class. It will help you to utilize entire width of apge.
ul.nav-tabs > li {
width: 33%;
text-align: center;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />
<div class="container-fluid">
<ul class='nav nav-tabs'>
<li class='dropdown'>
<a class='dropdown-toggle' data-toggle='dropdown' href='#'>Test 1</a>
<ul class='dropdown-menu'>
<li><a href='#'>test 1</a>
</li>
</ul>
</li>
<li class='dropdown'>
<a class='dropdown-toggle' data-toggle='dropdown' href='#'>Test 2</a>
<ul class='dropdown-menu'>
<li><a href='#'>test 2</a>
</li>
</ul>
</li>
<li class='dropdown'>
<a class='dropdown-toggle' data-toggle='dropdown' href='#'>Test 3</a>
<ul class='dropdown-menu'>
<li><a href='#'>test 3</a>
</li>
</ul>
</li>
</ul>
</div>
<div class="content">
<ul class="clean menu" id="topics">
<li class="drop png">
<div>
<span href="#" id="phone" style="BACKGROUND-POSITION: 13px -79px">Phone</span>
</div>
<ul class="clean menu sub">
<li>
<a cat="tech" class="sec_phone_0" href="javascript:void(0);" name="&lid=choose_category_phone_digital" rel="1">FiOS Digital Voice</a>
</li>
<li class="last">
<a cat="tech" class="sec_phone_1" href="javascript:void(0);" name="&lid=choose_category_phone_dialup" rel="1">Home Phone(Copper)</a>
</li>
<li class="last">
<a cat="tech" class="sec_phone_2" href="javascript:void(0);" name="&lid=choose_category_phone_fiosVoice" rel="1">FiOS Voice</a>
</li>
<li class="last" style="margin-bottom:7px;">
<a cat="tech" class="sec_phone_2" href="javascript:void();" name="&lid=choose_category_phone_wireless" rel="1">Verizon Wireless</a>
</li>
</ul>
</li>
</ul>
</div>
Now I need to select the "cat" value of Fios Voice. How can I do this in Mootools v1.3.2?
Need to set the value in cookie.
This script gets the property of link on click event.
window.addEvent('domready',function(){
$$('ul.sub')[0].getElements('a').each(function(el,ind){
el.addEvent('click',function(){
var cat = el.getProperty('cat');
alert(cat)
})
})
})
For case when <a cat="tech1" class="sec_phone_0 active" href="javascript:void(0);" name="&lid=choose_category_phone_digital" rel="1">FiOS Digital Voice</a> has class="active"
window.addEvent('domready',function(){
if($$('ul.sub')[0].getElements('a.active')[0]){
var cat = $$('ul.sub')[0].getElement('a.active').getProperty('cat');
alert(cat);
}
})