使用 jQuery 对表单进行分组突出显示
根据本教程对表单进行分组突出显示,我发现: http://www.jankoatwarpspeed.com/ example/ContextHighlighting/
现在我已经构建了表单的一部分,但组突出显示不起作用。任何帮助将不胜感激: http://jsfiddle.net/coachpacman/pYEBZ/
我认为问题出在我的 jQuery 中,但与教程语法进行比较时我似乎找不到问题。
Working on group highlighting for a form based on this tutorial I found: http://www.jankoatwarpspeed.com/examples/ContextHighlighting/
Right now I have a part of the form built out but group highlighting doesn't work. Any help would be greatly appreciated: http://jsfiddle.net/coachpacman/pYEBZ/
I think the problem is in my jQuery, but I can't seem to find a problem when comparing to the tutorial syntax.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
确保在左侧窗格中将 JavaScript 框架设置为 jQuery。当您执行此操作时,当您在表单字段内单击时,整个表单都会突出显示。
如果您只想突出显示单个行,那么您需要更改 HTML 以匹配:
因为在当前代码中您缺少每个单独的行。
此时,您将必须使用 JavaScript 的另一部分来突出显示整个代码部分:
Make sure you set the JavaScript framework to jQuery, on the left-side pane. When you do that, the entire form highlights when you click inside a form field.
If you wished to just highlight an individual row then you need to change your HTML to match:
Because in your current code you are missing each individual row.
At this point you will have to use the other piece of the JavaScript to highlight an entire section of code:
在 jsfiddle 中,将框架更改为 jquery 而不是 mootools,然后单击运行。据我所知,它突出显示“OK”。
In jsfiddle, change your framework to jquery and not mootools, then click run. It highlights OK as far as I can see.