代码如下我面临什么问题?我希望 jquery 按钮幻灯片适用于 jsf 代码中的命令链接。我已经尝试了所有选择,但没有得到正确的输出。查询:
<script type="text/javascript">
$(function() {
$('.button_bLeft').hover(
function () {
var $this = $(this);
var $slidelem = $this.prev();
$slidelem.stop().animate({'width':'225px'},300);
$slidelem.find('span').stop(true,true).fadeIn();
$this.addClass('button_c');
},
function () {
var $this = $(this);
var $slidelem = $this.prev();
$slidelem.stop().animate({'width':'70px'},200);
$slidelem.find('span').stop(true,true).fadeOut();
$this.removeClass('button_c');
}
);
});
</script>
html代码-
<a class="button_aLeft"><span>Sign In</span></a>
<a class="button_bLeft">Sign</a>
JSF:
<td ><h:panelGrid columns="6" width="100%" columnClasses="button_bLeft">
<c:forEach items="#{collectionPlace}" var="places" class="button_aLeft">
<c:if
test="#{places.country eq allPlaces.country and places.regionName eq allState.regionName}">
<h:commandLink action="#{placesManager.showDetail}"
value="#{places.cityName}" styleClass="b_one"
render="panelgrp1,panel1:panelgrp3">
<f:param name="cityid" value="#{places.placeid}" />
</h:commandLink>
</c:if>
</c:forEach>
</h:panelGrid>
</td>