簡體   English   中英

需要有關jQuery ToolTip的幫助

[英]Need help with jQuery ToolTip

http://rndnext.blogspot.com/2009/02/jquery-ajax-tooltip.html

我想實現類似上面鏈接的內容。 現在,這會使用PageID彈出框從某個頁面獲取數據的框,而不會使用PageID。 我希望該彈出框的內容中包含簡單的HTML內容,並將在以后綁定。 上面的一個讓我不熟悉的Ajax。

我需要更改代碼中的什么? 我想要的只是一個簡單的彈出框,其外觀與上面的框完全相同,並且以相同的方式打開,而且,所有其中都包含簡單的HTM1內容。 我要在什么地方進行更改?

盡管您尚未發布任何嘗試進行此操作的嘗試,但我會盡力幫助您。

如果我理解正確,那么您想擺脫AJAX,只添加普通HTML吧? 好吧,我至少會告訴您將HTML放在哪里以開始使用。

您可以在他們的網站的第51行看到:

$('#personPopupContent').html(' ');

您可以將nbsp位更改為所需的任何HTML。 例如:

$('#personPopupContent').html('<strong>My strong text</strong>');

您還可以從第53至74行刪除,其中顯示:

$.ajax({
    type: 'GET',
    url: 'personajax.aspx',
    data: 'page=' + pageID + '&guid=' + currentID,
    success: function(data)
    {
      // Verify that we're pointed to a page that returned the expected results.
      if (data.indexOf('personPopupResult') < 0)
      {
          $('#personPopupContent').html('<span >Page ' + pageID + ' did not return a valid result for person ' + currentID + '.Please have your administrator check the error log.</span>');
      }

      // Verify requested person is this person since we could have multiple ajax
      // requests out if the server is taking a while.
      if (data.indexOf(currentID) > 0)
      {                  
          var text = $(data).find('.personPopupResult').html();
          $('#personPopupContent').html(text);
      }
    }
});

由於您將不會使用它。

希望對您有所幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM