0

当我点击时,我会jquery balloon显示。 这是jquery 气球的链接, 我想点击它并通过. 所以我可以使用它 但是我有很多困难 这是我的:iframedatemy calendar

datesendurliframe
$_GET

code

<script type="text/javascript">
  var shown = true;
  $(function() {
  $.balloon.defaults.classname = "my-balloon";
  $.balloon.defaults.css = null;
    $('.date').on("click", function() {
      if (shown) {
        $('.date').hideBalloon();
        $(this).showBalloon();
        // Get text from what I click and used it in iframe src
        document.getElementById('iframe-date').src += '&date=' + $(this).text()
        shown = false;
      } else {
        $('.date').hideBalloon();
        shown = true;
      }
    }).showBalloon({
      //iframe is on contents
      contents: '<div style="text-align:right">'
        + '<img style="width:15px" onclick="closeBalloon()" src="<?php echo get_uri('public/images/icon-error.png') ?>">'
        + '</div>'
        + '<iframe id="iframe-date" scrolling="no" seamless="seamless" src="<?php echo get_uri('admin/room/iframeDate/?id=' . $id) ?>"><p>Your browser does not support iframes.</p></iframe>'
    });

    $('.date').hideBalloon();
  }); 

  function closeBalloon()
  {
    $('.date').hideBalloon();
    shown = true;
  }
</script>
4

0 回答 0