在jQuery mobile中更改数据主题 [英] Change data-theme in jQuery mobile

查看:99
本文介绍了在jQuery mobile中更改数据主题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在用户按下按钮后向他们提供一些持续的反馈(例如缩进等).我试过了:

I'd like to provide my user some persistent feedback after they've pressed a button (like it's indented or something). I tried:

$(this).data('theme','b');

但这不起作用.

问:有没有办法显示缩进的按钮,或者即时更改它的data-theme?

Q: Is there a way to show an indented button, or change it's data-theme on the fly?

推荐答案

我知道这是一个老问题,但是我最近才遇到这个问题.

I know this is an old question, but I just recently ran into this hurdle myself.

执行此操作的正确方法如下:

The correct way of doing this would be as follows:

$(this).buttonMarkup({theme: 'b'});

这篇关于在jQuery mobile中更改数据主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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