문제

Could it possible to show inline content in lightbox2 popup? Currently I am using:

<a id='lbpopup' href='/popupcontent.php' rel='lightframe' style='display:none;'>flyover</a>
<script type="text/javascript">
  $(document).ready(function(){
    $('#lbpopup').click();
  });
</script>

By using the above code popup is working, but it using an iframe to load content from the page popupcontent.php

Actually my requirement is :

<html>
  <body>
    <div id='popup-content'>My Popup Content</div>
    <a id='lbpopup' href='#'>Click here</a>
  </body>
</html>

While click on the link #lbpopup, I want to show the content of div #popup-content as popup without using iframe. How can I do that?

I don't want to try any other jQuery popups like fancybox, colorbox etc. I just want to make it with lightbox2 only.

도움이 되었습니까?

해결책

Lightbox2 doesn't seem to have many features. It would be sorta hacky if you want to get inline content to work. Maybe you can try this

https://web-beta.archive.org/web/20151110065936/http://old.joesong.com:80/2010/02/showing-in-page-and-inline-content-in-lightbox2/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top