rel

Jquery: Add rel attribute to <a> tags within all <li> tags of a certain class

夙愿已清 提交于 2019-12-05 17:22:26
I'm trying to add a rel="lightframe" attribute to all my 'edit' links within my admin_links_node_edit class. <li class="admin_links_node_edit"> <a href="[link]" title="Edit">Edit</a> </li> My code so far looks like this: $('.admin_links_node_edit a').each(function() { $(this).attr('rel','lightframe'); }); You don't need to use each(). jQuery's selectors will do it for you :) $('.admin_links_node_edit a').attr('rel', 'lightframe') The above code will do the trick. If admin_links_node_edit is reused among other elements, you'll want to specify the element you're working on ( li in this case). In

'itemprop' and 'rel' attributes on same element

依然范特西╮ 提交于 2019-12-05 09:51:05
Is it valid to use the itemprop attribute and the rel attribute on the same element? The example from Google’s Site Name documentation contains <link rel="canonical" href="https://example.com/" itemprop="url"> which gives this error in https://validator.w3.org/nu/ : Attribute rel not allowed on element link at this point. It depends on the specification. Microdata, where the itemprop attribute is coming from, is defined by WHATWG’s HTML as well as by W3C’s HTML Microdata . The WHATWG version is a living standard without snapshots (so things might change; my quotes are from 2015-07-25), the W3C

Specify custom canonical URL in WordPress Post

一曲冷凌霜 提交于 2019-12-04 23:37:03
问题 We operate 1000's of websites, most of them are are made for specific sports events. Currently we have our writers write to all of them specifically for unique content. However we have 2 major sites that cover all events in their verticals; and we would like to start syndicating content to the minisites, from these major sites. To maintain best practices in Google's eyes, we would have to specify the original source of the article via the rel=canonical tag - however our current plugin AIOSEO

Rich Snippets: rel=“nofollow” and RDFa

天涯浪子 提交于 2019-12-03 21:59:19
问题 I'm using Rich Snippets to markup my content according to the collections on schema.org. I am using RDFa Lite to do so and am now having a problem with the rel attribute. Some of my links do have the rel="nofollow" attribute/value. As RDFa Lite is a subset of RDFa, the rel attribute gets recognised as additional markup. Please see this upload to Google's Structured Data Testing Tool for the extracted data for the following markup: <div vocab="http://schema.org/" typeof="SportsTeam"> <span

Specify custom canonical URL in WordPress Post

孤街浪徒 提交于 2019-12-03 14:20:16
We operate 1000's of websites, most of them are are made for specific sports events. Currently we have our writers write to all of them specifically for unique content. However we have 2 major sites that cover all events in their verticals; and we would like to start syndicating content to the minisites, from these major sites. To maintain best practices in Google's eyes, we would have to specify the original source of the article via the rel=canonical tag - however our current plugin AIOSEO (All-in-One SEO) doesn't support specifying canonical tags on a post, or page basis. Is there a way to

How the hreflang is supposed to be built?

泪湿孤枕 提交于 2019-12-02 17:53:10
问题 My question is does the <link rel="alternate" href="http://example.com/en" hreflang="en"> <link rel="alternate" href="http://example.com/it" hreflang="it"> should be like above an all pages or should be changed with the actual url of every page like: <link rel="alternate" href="http://example.com/en/<?=$current;?>" hreflang="en"> <link rel="alternate" href="http://example.com/it/<?=$current;?>" hreflang="it"> <link rel="alternate" href="http://example.com/<?=$current;?>" hreflang="x-default">

Get attributes from the rel attribute with jQuery

你说的曾经没有我的故事 提交于 2019-12-02 08:27:18
问题 Im using a plugin that requires the rel-element to look like this. <ul id="product-thumbs-list"> <li><a href="1-big.jpg" rel="useZoom: 'cdonZoom', smallImage: '1.jpg'"></li> <li><a href="2-big.jpg" rel="useZoom: 'cdonZoom', smallImage: '2.jpg'"></li> </ul> Is it possible to get the smallImage-value via jQuery? In this case, '1.jpg, or '2.jpg'. Thanks! 回答1: Here is one way: $("#product-thumbs-list a").each(function(index) { var arrTemp = $(this).attr("rel").split("smallImage: "); var value =

When should I use rel=noreferrer?

怎甘沉沦 提交于 2019-12-01 03:23:17
问题 I have to link some other external sites. I know when to use nofollow . But I am not clear when I should use rel=noreferrer . 回答1: In short, the noreferrer link type hides referrer information when the link is clicked . A link with the noreferrer link type looks something like this: <a href="http://www.example.com" rel="noreferrer">Click here for more info</a> If someone arrives at your site from a link that uses this link type, your analytics won't show who refered that link. Instead, it

HATEOAS - How to model link relations that change state

对着背影说爱祢 提交于 2019-11-30 04:18:58
问题 Following HATEOAS principles that each states should be hyperlinked, what is the best way to model links that change resource state? Let's take classical example with orders: { id : 12, state: 'pending', ..., links: [ ..., { rel: 'cancel', href: '/orders/12/cancel' }, ... ] } I am not totall happy with that "/cancel" part - I would feel a lot better if I could send " PUT " request with contents: { status:'cancelled' } But how do I represent that with "href" attribute in links section? I would

External links: when use rel=“external” or rel=“nofollow”?

≯℡__Kan透↙ 提交于 2019-11-30 02:48:57
In most of my web site I have a lot of external links to my other sites and other external sites. I need to know when is better to use rel="nofollow" or rel="external" in a website? unor You may use external for every link to a different website, no matter if it’s yours or not, if it’s on the same host or not. You may use nofollow for every link that you don’t endorse (for example: search engines shouldn’t assume that it’s a relevant link and should not give any ranking credit to this link). You may use both values for the same link: <a href="http://example.com/" rel="external nofollow">Foobar