Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/unity3d/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
JqueryMobile用图像替换单选按钮_Jquery_Jquery Mobile - Fatal编程技术网

JqueryMobile用图像替换单选按钮

JqueryMobile用图像替换单选按钮,jquery,jquery-mobile,Jquery,Jquery Mobile,我正在使用jquerymobile为一个web应用程序创建一个广播组。在某一点上,用户必须在“男性”和“女性”之间进行选择。我有点击(触摸)性别和未点击性别的图像。我想用两个具有两种状态的图像替换无线电组。 我该怎么做呢?我在这里给你举了个例子: $('div[data role=“fieldcontain”]fieldset div div div:first child label span').html(“”); $('div[data role=“fieldcontain”]fields

我正在使用jquerymobile为一个web应用程序创建一个广播组。在某一点上,用户必须在“男性”和“女性”之间进行选择。我有点击(触摸)性别和未点击性别的图像。我想用两个具有两种状态的图像替换无线电组。
我该怎么做呢?

我在这里给你举了个例子:

$('div[data role=“fieldcontain”]fieldset div div div:first child label span').html(“”);
$('div[data role=“fieldcontain”]fieldset div div:last child label span').html(“”);
如果你想要其他的东西,请在评论中告诉我,如果你有每个州的图片,请给我一个位置,我会重建这个例子

$('div[data-role="fieldcontain"] fieldset  div div:first-child label span span').html('<img src="http://cdn1.iconfinder.com/data/icons/Snow/Snow/snow/Male.png" width="32px" height="32px"></img>');
$('div[data-role="fieldcontain"] fieldset  div div:last-child label span span').html('<img src="http://cdn1.iconfinder.com/data/icons/Snow/Snow/snow/Female.png" width="32px" height="32px"></img>');