在jQuery mobile中更改数据主题

编程入门 行业动态 更新时间:2024-10-23 11:23:22
本文介绍了在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中更改数据主题

本文发布于:2023-10-16 00:28:19,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1495935.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数据   主题   jQuery   mobile

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!