Advertisement
Guest User

Untitled

a guest
Mar 5th, 2015
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. $.ajax({
  2. type: "GET",
  3. url: "/url/to/ajax",
  4. data: {"foo": bar},
  5. success: function(data) {
  6. $("#my-table").html(data['html']);
  7. // alert(data['script']); // this works: I can see the script
  8. eval(data['script']);
  9. },
  10. error: function() {
  11. $("#my-table").html('');
  12. }
  13. });
  14.  
  15. $(".foobar1").tooltip({
  16. content: "The <em>foo</em> to the <strong>bar</strong>.",
  17. tooltipClass: "tt-ref",
  18. show: null,
  19. close: function (event, ui) {
  20. ui.tooltip.hover(
  21. function () {
  22. $(this).stop(true).fadeTo(400, 1);
  23. },
  24. function () {
  25. $(this).fadeOut("400", function () {
  26. $(this).remove();
  27. })
  28. });
  29. }
  30. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement