使用 jQuery 突出显示异步页面更改的替代方法
一些 jQuery 用例要求让用户知道(通常通过一些动画)页面上的某些内容已更改。例如,用户在文本框中输入格式字符串(带有可以替换的不同标记的代码),然后在用户完成输入后 1 秒,页面的不同区域会更新文本内容的实时预览看起来就像所有的令牌都被替换了。
jQuery UI“突出显示”效果就是这样的一个示例 - 受影响的区域短暂闪烁黄色,然后淡回原始背景颜色。
还有哪些其他预构建的 jQuery 效果可用于此任务?请将每个链接作为单独的答案发布,然后为您最喜欢的链接投票。然后,当经理说“我喜欢这个概念,但我不喜欢它的外观”时,我们都会准备好替代方案。
Some jQuery use cases call for letting the user know (usually through some animation) that something on the page has changed. For example, the user enters a format string in a text box (with codes for different tokens that can be replaced), then 1 second after the user is done typing, a different area of the page updates a live preview of what the text will look like with all the tokens replaced.
The jQuery UI "Highlight" effect is one example of this - the affected region briefly flashes yellow before fading back to the original background color.
What are some other pre-built jQuery effects that could be used for this task? Please post each link as a separate answer and then upvote your favorites. Then we'll all be ready with alternatives when a manager says "I like the concept but I don't like how it looks."
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
淡黄效果是这种情况下最常用的效果之一,人们可能已经开始习惯它了。
也许它不“可爱”或什么的,但如果它被广泛接受,你可能应该接受它;它会让你的应用程序更容易理解,这绝对是最重要的。
这里有几个链接:
看起来这就是 jQuery 的亮点正在做的事情 - 这可能是有充分理由的选择 ;-)
The yellow-fade effect is one of the most used effects in this kind of situation -- and people have probably started getting used to it.
Maybe it's not "cute" or anything, but if it's well accepted, you should probably go with it; it would make your application easier to understand, and that is definitely what should matter.
Here are a couple of links:
And it seems this is what jQuery's highlight is doing -- there is probably a good reason for that choice ;-)