我有一个带有属性 rel
的锚点
。 rel值中有html,例如
Clearbox 顺便说一下
示例(我知道这里的 html 不正确,但在我的页面上是正确的)我只需要知道如何通过jquery或任何其他方式更新它)
<a rel="html=<div class="testclass"> This is a test</div></a>
一块html元素(而不是a)需要更改为
<a rel="html=<div class="testclass"> No more testing </div></a>
I have a anchor <a></a>
with an attribute rel
. in the rel value there is html, such as <a rel="html=<div>This is a test</div>
. I want to update html inside of rel value, I can update the actual change on the page but if i go to the next slide and come back, its back to what it was before because the rel value is not updated. I am not sure how to go about doing this. Any suggestions, I am using Clearbox by the way.
Example(I know the html is incorrect on here, but it is correct on my page. I just need to know how to update it through jquery or any other way)
<a rel="html=<div class="testclass"> This is a test</div></a>
a piece of the html element (not the a) Needs to be changed to
<a rel="html=<div class="testclass"> No more testing </div></a>
发布评论
评论(2)
您可以(但不应该)使用
JSFiddle 此处执行此操作
You can (But SHOULDN'T) do that with
JSFiddle here
我认为您需要避免在另一个双引号内使用双引号,如果您使用双引号来包裹字符串,请在该字符串内使用单引号,反之亦然。
看到这个--> http://jsfiddle.net/Galled/rXKCL/14/
I think you need to avoid the use of double quotes inside another double quotes, if you are using double quotes to wrap a string use single quotes inside that string and vice versa.
See this --> http://jsfiddle.net/Galled/rXKCL/14/