想显示隐藏某些条件的href链接 [英] want to show hide a href link with some conditions

查看:87
本文介绍了想显示隐藏某些条件的href链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,你今天怎么样。我正在开发一个Web应用程序。我有四个href菜单(例如菜单1菜单2菜单3菜单4)项目。我想检查条件是否客户是免费的,然后菜单Menu4应该是不可见的,如果客户付款,那么他们可以访问或查看以上所有菜单(例如菜单1菜单2菜单3菜单4)。请尽可能提出任何想法。

提前致谢!

解决方案

这是一个锚元素,在这方面与其他元素没什么不同。



例如,使用jQuery .show()/。hide()

http://api.jquery.com/show/ [ ^ ],

http:/ /api.jquery.com/hide/ [ ^ ] 。



通过这种方式,你甚至可以用Cheshire Cat风格制作动画显示和隐藏:http://en.wikipedia.org/wiki/Cheshire_Cat [ ^ ] :-)。



如果您需要学习jQuery(强烈推荐),请参阅:

ht tp://en.wikipedia.org/wiki/JQuery [ ^ ],

http://jquery.com/ [ ^ ],

http://learn.jquery.com/ [ ^ ],

http://learn.jquery.com/using-jquery-core/ [ ^ ],

http://learn.jquery.com/about-jquery/how-jquery-works/ [ ^ ](从这里)。



-SA


Hi, friends, How r u doing todays. I am working on a web application. I have four a href menu (Eg.- Menu1 Menu2 Manu3 Menu4 ) items. I want to check the condition if customer is free then the menu "Menu4" should be invisible and if customer is paid then they can access or see all above manu (Eg.- Menu1 Menu2 Manu3 Menu4). Please give any idea if possible.
Thanks in advance!

解决方案

This is an anchor element, no different from other element in this respect.

Use, for example, jQuery .show()/.hide():
http://api.jquery.com/show/[^],
http://api.jquery.com/hide/[^].

This way, you can even animate showing and hiding, in a Cheshire Cat style: http://en.wikipedia.org/wiki/Cheshire_Cat[^] :-).

If you need to learn jQuery (highly recommended), please see:
http://en.wikipedia.org/wiki/JQuery[^],
http://jquery.com/[^],
http://learn.jquery.com/[^],
http://learn.jquery.com/using-jquery-core/[^],
http://learn.jquery.com/about-jquery/how-jquery-works/[^] (start from here).

—SA


这篇关于想显示隐藏某些条件的href链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆