开发者

How to create HTML5 data-* in MVC3

开发者 https://www.devze.com 2023-03-28 05:25 出处:网络
I\'m using JQuery mobile and I need to include data-prefetch attribute in a link created with HTML.ActionLink.I\'ve found examples on Stackoverflow of how to pass data-* attributes in the standard way

I'm using JQuery mobile and I need to include data-prefetch attribute in a link created with HTML.ActionLink. I've found examples on Stackoverflow of how to pass data-* attributes in the standard way with object Html att开发者_JAVA百科ributes. However I can't seem figure out how to create an attribute that has no value. Best I can create is data-prefetch="" by using new{data_prefetch=""} . I'm assuming that isn't the same.

Any ideas?


As far as I can see using data-prefetch="data-prefetch" works fine. So I guess there is no need to do anything else.

Thanks feeela

0

精彩评论

暂无评论...
验证码 换一张
取 消