English 中文(简体)
页: 1
原标题:sIFR and jQuery: dynamically replacing text
  • 时间:2010-02-02 19:10:54
  •  标签:
  • jquery
  • sifr

我有一个问题。 我愿更新一个警台(由用户在某个小区展示),当一个县受到压力。 因此,当纽伦受到压力时:

$("#photo-counter span").empty().append((start_index+1)+"-"+(end_index+1)+" / "+files.length);  
sIFR.replace(netto, { selector: "#photo-counter span"});

这第一次自动运行,所有工作都进行罚款,但当我点击《<条码>div<>/条码>时,没有被<条码>取代。

谁能提供帮助?

最佳回答

您实际上可以这样做:

sIFR.replacements["#photo-counter span"][0].replaceText((start_index+1)+"-"+(end_index+1)+" / "+files.length);

无需更新超文本,《国际红十字与红新月联会要照顾到你们的一切。

问题回答

更多的法典有助于解决这一问题。

任何航道,这里是一枪:

将你点击改为点击:

$( #yourElement ).live( click , function(){
    $("#photo-counter span").empty().append((start_index+1)+"-"+(end_index+1)+" / "+files.length);  
    sIFR.replace(netto,{
        selector: "#photo-counter span"
    });
});

希望这一帮助!

这里的全文是:

$("#arrow-left").mouseup(function() {
if(!$("#frame > *").is(":animated") && status != "fullscreen"){
$(this).css({"opacity":"1.0"});

arrowClick("left");
}};

function arrowClick(direction) {
(...) /* i dont think the problem is located somewhere here */
refreshCounter(start, end);
(...)
}

function refreshCounter(start_index, end_index) {
if(files.length > 0) {
start_i = start_index;
end_i = end_index;
if(start_index !=null && end_index != null) {
$("#photo-counter span").empty().append((start_index+1)+"-"+(end_index+1)+" / "+files.length);  
sIFR.replace(netto, { selector: "#photo-counter span"});
}
}




相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签