繁体   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