日期:2014-05-17  浏览次数:20935 次

新人求助
前台代码:
function contentPicMove(pics) {
  $("#TextPicCont").jCarouselLite({
  //btnNext: "#gt",
  //btnPrev: "#lt",

  vertical: true,
  visible: (pics < 4 ? pics : 4),
  auto: (pics < 4 ? false : 2000),
  speed: 800,
  circular: true
  });
  }
<script type="text/javascript">
  var picCont = <%=NewsPicRpt.Items.Count %>;
  if(picCont > 0 ) {
  $(function () {
  $("#TextPicCont").jCarouselLite({
  vertical: true,
  visible: (picCont < 4 ? picCont : 4),
  auto: (picCont < 4 ? false : 2000),
  speed: 1000,
  circular: true

  });
  });
  }
  </script>
  <div id="TextPicCont" runat="server" style="">
   
  <asp:Repeater ID="NewsPicRpt" runat="server" >
  </asp:Repeater>

后台的pageload()里面
ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "test", "contentPicMove(" + picDt.Rows.Count + ");", true);

------解决方案--------------------
没看出来 你断一下试试就知道了