如何使用jquery动态禁用选项卡 [英] how to disable the tabs dynamically using jquery
问题描述
我的要求是,我想动态禁用标签意味着我有一个静态创建的7个标签,我有3个用户。所以我想单独向用户授予权利。在3个用户中,一个是超级管理员 - 必须启用所有选项卡,第二个是管理员 - 必须启用5个选项卡,最后一个是用户 - 必须启用3个选项卡。当用户登录时,必须检查是超级管理员/ admin / user并且必须启用受尊重的选项卡。
i是jquery的新手,你能不能请任何人帮助我。
问候,
您可以尝试下面提到的内容。
第1步:检索你的来自服务器的 ajax请求的用户角色。
jQuery.ajax()
第2步:根据以上内容响应,禁用相关标签。
如何禁用/启用表单元素?
我希望这会对你有所帮助。 :)
My requirement is, i want to disable tabs dynamically means i have a 7 tabs statically created and i have 3 users. So i want to give the rights to the users individually. in 3 users one is super admin - have to give all tabs enable, second one is admin - have to give 5 tabs enable and last one is user - have to give 3 tabs enable.when the user login, have to check is super admin/admin/user and have to enable respected tabs.
i am new in jquery, can you please any one help me.
Regards,
You may try something as mentioned below.
Step 1 : Retrieve your user role by using ajax request from your server.
jQuery.ajax()
Step 2 : According to the above response, disable the relevant tabs.
How do I disable/enable a form element?
I hope this will help to you. :)
这篇关于如何使用jquery动态禁用选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!