Hallo,
ich habe folgendes Problem, auf meiner Startseite sind mehrere Tabellen mit auflistungen von den Artikel (Cover, Release, Kategorie usw.), wenn man mit der Maus über ein Artikel Titel fährt dann erscheind ein Tooltip (Div). Das Funktioniert soweit alles wie gewünscht, außer, dass der Inhalt des Tooltip schon komplett geladen wird, und deswegen die Html-Datei viel zu groß wird (Ladezeit wird viel Größer).
Ich würde es gerne so haben, dass erst beim Mouseover des Titel der Inhalt des Tooltip geladen wird.
<div class="single">
<div class="main-area">
<ul>
<li class="main-head">
<span class="main-pic-h">Cover</span>
<span class="main-rls-h">Release</span>
<span class="main-cat-h">Kategorie</span>
<span class="main-size-h">Größe</span>
<span class="main-upper-h">Uploader</span>
<span class="main-date-h">Datum</span>
</li>
<?php $rand_posts = get_posts('category=-11,-73,-75,-74,-95,-4&numberposts=10'); foreach( $rand_posts as $post ) : setup_postdata( $post ); ?>
<li class="main-single">
<span class="main-pic"><a href="<?php $thumbnail_id=get_the_post_thumbnail($post->ID); preg_match ('/src="(.*)" class/',$thumbnail_id,$link); echo $link[1]; ?>" rel="lightbox"><?php the_post_thumbnail( 'main-pic', array( 'title' => get_the_title() ) ); ?></a></span>
<span class="main-rls">
<b>
<a class="tooltip" href="<?php the_permalink() ?>">
<?php $content = get_the_content(); $content = apply_filters('the_content', $content); $result = getInbetweenStrings('<li><b>Titel: </b>', '</li>', $content); $result1 = substr($result, 0 , 56); echo "$result1"; ?>
<span>
<div class="tTop">
<div class="tTitle"><?php $content = get_the_content(); $content = apply_filters('the_content', $content); $result = getInbetweenStrings('<li><b>Titel: </b>', '</li>', $content); echo "$result"; ?></div>
<div class="tRlsTitle"><?php the_title(); ?></div>
</div>
<div class="tCover">
<?php the_post_thumbnail( 'thumbnail', array( 'title' => get_the_title() ) ); ?>
</div>
<div class="tRight">
<div class="tDescr">
<?php $content = get_the_content(); $content = apply_filters('the_content', $content); $result = getInbetweenStrings('<div id="upload-descr">', '</div>', $content); $result1 = substr($result, 0 , 330); echo "$result1"; ?>...
</div>
<div class="tinfo">
<b>Genre: </b><?php $content = get_the_content(); $content = apply_filters('the_content', $content); $result = getInbetweenStrings('<li><b>Genre: </b>', '</li>', $content); echo "$result"; ?><br>
<b>Laufzeit: </b><?php $content = get_the_content(); $content = apply_filters('the_content', $content); $result = getInbetweenStrings('<li><b>Laufzeit: </b>', '</li>', $content); echo "$result"; ?><br>
<b>Größe: </b><?php $content = get_the_content(); $content = apply_filters('the_content', $content); $result = getInbetweenStrings('<li><b>Größe: </b>', '</li>', $content); echo "$result"; ?><br>
<b>Sprachen: </b><?php $content = get_the_content(); $content = apply_filters('the_content', $content); $result = getInbetweenStrings('<li><b>Sprachen: </b>', '</li>', $content); echo "$result"; ?><br>
<b>Uploader: </b><?php the_author() ?>
</div>
</div>
<div class="clear"></div>
</span>
</a>
</b>
<br><?php the_title(); ?>
</span>
<span class="main-cat"><?php the_category('<br>') ?></span>
<span class="main-size"><?php $content = get_the_content(); $content = apply_filters('the_content', $content); $result = getInbetweenStrings('<li><b>Größe: </b>', '</li>', $content); echo "$result"; ?><br> <?php $content = get_the_content(); $content = apply_filters('the_content', $content); $result = getInbetweenStrings('<li><b>Sprachen: </b>', '</li>', $content); echo "$result"; ?></span>
<span class="main-upper"><?php echo the_author_posts_link(); ?><br><?php if(function_exists('the_views')) { the_views(); } ?></span>
<span class="main-date"><?php the_time('d.m.Y') ?><br><?php the_time('G:i') ?> Uhr</span>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
Alles anzeigen
Hoffe das mir da jemand weiterhelfen kann, habe schon paar Sachen versucht aber es hat nichts gebracht.
Vielen dank schonmal im vorraus