你能告诉我如何在jQuery Mobile中添加焦点和未聚焦的图像。 我添加一个按钮。 我需要改变想象中的图像吗? onfocus或非onfocus ,以便用户可以轻松识别。选择了哪个按钮或未选择哪个按钮。如果我有两个按钮,我想我需要检查选择了哪个按钮或哪个按钮未被选中?
你能告诉我怎么做这个任务吗?
我这样用
<div class="ui-block-c" style="margin-left: 5px;"> <a href="#" data-role="button" data-corners="false" data-inline="true" class="next_h" id="next">Next</a> </div> <div class="ui-block-d" style="margin-left: 30px;"> <a href="#" data-role="button" data-corners="false" data-inline="true" class="previous_h" id="prev">Previous</a> </div>Can you please tell me how to add focus and unfocused image in jQuery Mobile. I add one button. I need to change images in think? onfocus or at unfocus so that it user can easily identify .Which button is selected or which button is unselected .If i have two button I think I need to check which button is selected or which button is unselected?
Can you please tell how to do this task?
I use like this
<div class="ui-block-c" style="margin-left: 5px;"> <a href="#" data-role="button" data-corners="false" data-inline="true" class="next_h" id="next">Next</a> </div> <div class="ui-block-d" style="margin-left: 30px;"> <a href="#" data-role="button" data-corners="false" data-inline="true" class="previous_h" id="prev">Previous</a> </div>最满意答案
您可以简单使用:将鼠标悬停在动画悬停上。
或者为focusin和focusout事件添加如下所示的类;
使用CSS和jQuery;
$("a").focusin(function(){ $(this).addClass("selected"); }); $("a").focusout(function(){ $(this).removeClass("selected"); });并定义一个新的CSS规则;
.selected { (add your selected picture as a background or another effect) }如果你想要单独的背景图片;
.selected .next_h { (add your selected picture as a background or another effect) } .selected .prev_h { (add your selected picture as a background or another effect) }You can simple use :hover to animate hover.
Or add a class as shown below for focusin and focusout events;
Using CSS and jQuery;
$("a").focusin(function(){ $(this).addClass("selected"); }); $("a").focusout(function(){ $(this).removeClass("selected"); });And define a new CSS rule;
.selected { (add your selected picture as a background or another effect) }If you want separate background pictures;
.selected .next_h { (add your selected picture as a background or another effect) } .selected .prev_h { (add your selected picture as a background or another effect) }更多推荐
button,class,按钮,onfocus,电脑培训,计算机培训,IT培训"/> <meta name="descr
发布评论