[英]“Ignore”-URL for crossroad.js when using the A-tag with slick-binding
I'm using knockout.js and crossroad.js. 我正在使用敲门声.js和crossroad.js。 (The later was configured by yeoman. I'm not sure I need it, but for now I don't know how to setup the project in another way.) (后者是由yeoman配置的。我不确定是否需要它,但是现在我不知道如何以其他方式设置项目。)
I have many a-tags with click-binding like this: 我有许多带有点击绑定的a标签,例如:
<a href='#' data-bind='click: select '>
Unfortunatelly, href='#' causes crossroars.js to change the location to home. 不幸的是,href ='#'导致crossroars.js将位置更改为家庭。 If I remove href='#' from a-tag, the cursor over the a-tag buttons change to edit-cursor, which is not nice. 如果我从a-tag中删除href ='#',则a-tag按钮上的光标会变为edit-cursor,这不好。
Can I use any other "dummy" value href-attribute which is ignored by crossroads.js? 我可以使用crossroads.js忽略的任何其他“虚拟”值href属性吗?
If you set the cursor with CSS, you don't need an href
at all. 如果使用CSS设置光标,则根本不需要href
。
.clicky { cursor: pointer; }
<a class="clicky">Whatever</a>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.