Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Load an HTML Page Within qTip Tooltip
18th January, 22:34 (This post was last modified: 18th January 22:35 by BruceBruce.)
Post: #1
Load an HTML Page Within qTip Tooltip
Im trying to load a simple html page, instead of a youtube video, using the code from this demo:

http://craigsworks.com/projects/qtip/dem...t/youtube#

I want it to function the same way, where I can go in and interact with the page content inside the tooltip, and then disappear when i click outside of the tooltip, and also if possible, have a close button on the top corner of the tooltip to close it.

How would i edit this code to just load a page called "MyCustomPage.html"?
Find all posts by this user
Quote this message in a reply
19th January, 00:42
Post: #2
RE: Load an HTML Page Within qTip Tooltip
You'll need to use an iframe:

JS Code
$('.selector').qtip({
	content: $('<iframe src="MyCustomPage.html" />')
});

Craig Thompson
Web Developer / Designer
Craigsworks
http://www.craigsworks.com
Visit this user's website Find all posts by this user
Quote this message in a reply
19th January, 01:17
Post: #3
RE: Load an HTML Page Within qTip Tooltip
(19th January 00:42)Craig Wrote:  You'll need to use an iframe:

JS Code
$('.selector').qtip({
	content: $('<iframe src="MyCustomPage.html" />')
});


Thanks Craig,

I tried that, and it seems to work, somewhat. Not quite like the youtube example though where the window stays open until i click outside of the bubble. Im using this with a calendar component and im also not getting the speech bubble behavior im looking for...the window instead opens up as a square right next to the hover area. I would also like to set the width and height of the iframe wih no horizontal scroll. I tried this code but it dosent work:

JS Code
<script>
$('#inlineDatepicker a').qtip({
   content: $('<iframe src="index.html">')
});
 
// Setup the tooltip with the content
      $(this).qtip(
      {
         content: content,
         position: {
            corner: {
               tooltip: 'bottomLeft',
               target: 'topRight'
            }
         },
         style: {
            tip: true, // Give it a speech bubble tip with automatic corner detection
            name: 'dark'
         }
      });
   });
</script>


How would I edit this accordingly?
Find all posts by this user
Quote this message in a reply
19th January, 12:17
Post: #4
RE: Load an HTML Page Within qTip Tooltip
Combine your two qTip calls:

JS Code
$('#inlineDatepicker a').qtip({
	content: $('<iframe src="index.html">'),
         position: {
            corner: {
               tooltip: 'bottomLeft',
               target: 'topRight'
            }
         },
         style: {
            tip: true, // Give it a speech bubble tip with automatic corner detection
            name: 'dark'
         }
});

Craig Thompson
Web Developer / Designer
Craigsworks
http://www.craigsworks.com
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Dynamic content from page variables kenswdev 0 415 9th February 18:06
Last Post: kenswdev
  Dynamic Content on first show, not page load TheOverbob 6 6,939 2nd August 13:01
Last Post: Craig
  [Solved] Displaying tooltip on page load/mouseover otherwise burghars 1 1,346 18th July 11:55
Last Post: Craig
  [Solved] modal with URL from another page? dod 2 1,498 2nd May 19:07
Last Post: Craig
  [Solved] Using Complex HTML as Tooltip Content sylvia 1 2,400 3rd November 02:07
Last Post: Craig
  [Solved] qTp modal dialog , on page load c0mrade 5 3,977 13th August 16:13
Last Post: mattsyk
  Tutorial: Dynamic content on first load using ajax Abrasive 0 4,821 28th June 05:44
Last Post: Abrasive
  how to load different content each time andufo 1 1,841 28th May 16:00
Last Post: andufo
  Callbacks fire on page load when they shouldn't anomalous 1 1,272 4th February 22:12
Last Post: anomalous
  How to remove created HTML? kenan 10 2,469 24th December 12:58
Last Post: kenan



User(s) browsing this thread: 1 Guest(s)