craigsworks.com - Support Forum

Full Version: [Solved] Browser still showing regular tooltip in addition to qTip
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys,

Absolutely love the power of this script! However there is a problem I'm finding really difficult to squash: even though the qTip is showing successfully, the browser is also showing the regular tooltip at the same time.

Here is the JavaScript I'm using:

JS Code
// qTip
   $('div.site_updates ul li').each(function(){
      $(this).qtip({
         content: $(this).children('span.hidden'),
         hide: {
            delay: 0,
            effect: {
               length: 0,
               type: 'none'
            },
            event: 'mouseover'
         },
         position: {
            adjust: {
               screen: true,
               x: -10,
               y: 50
            },
            corner: {
               target: 'rightMiddle',
               tooltip: 'bottomLeft'
            },
            target: 'mouse'
         },
         show: {
            delay: 250,
            effect: {
               length: 0,
               type: 'none'
            },
            event: 'mouseover'
         },
         style: {
            'background': '#000',
            'border': '0',
            'color': '#808080',
            'padding': '3px 5px 3px 5px',
            'text-align': 'left',
            width: {
               max: 500
            }
         }
      });
   });


The associated HTML:

JS Code
<div class="site_updates">
                  <p class="title"><strong>Site Updates</strong>:</p>
                  <ul>
                     <li>
                        <p><a href="http://www.brutallegend.net/videos/celebrity-trailer/"><img class="alignnone size-full wp-image-5936" title="Lemmy" src="http://cdn.brutallegend.net/media/lemmy.jpg" alt="Lemmy" width="175" height="131" /></a></p>
                        <span class="hidden"><strong>1</strong> week ago: <a href="http://www.brutallegend.net/videos/celebrity-trailer/">Added 1 video to 'Videos' section</a></span>
 
                     </li>
                     <li>
                        <p><a rel="attachment wp-att-5723" href="http://www.brutallegend.net/fan-art/brutal_legend_20091011124648/"><img class="alignnone size-thumbnail wp-image-5723" title="brutal_legend_20091011124648" src="http://cdn.brutallegend.net/media/brutal_legend_20091011124648-175x131.jpg" alt="brutal_legend_20091011124648" width="175" height="131" /></a></p>
                        <span class="hidden"><strong>1</strong> week, <strong>6</strong> days ago: <a href="http://www.brutallegend.net/fan-art/">Added 2 images to 'Fan Art' gallery</a></span>
                     </li>
 
                     <li>
                        <p><a href="http://www.brutallegend.net/videos/tim-schafer-and-jack-black-compare-brutal-legend/"><img class="alignnone size-full wp-image-5614" title="Tim Schafer and Jack Black" src="http://cdn.brutallegend.net/media/tim_schafer_and_jack_black.jpg" alt="Tim Schafer and Jack Black" width="175" height="131" /></a></p>
                        <span class="hidden"><strong>2</strong> weeks ago: <a href="http://www.brutallegend.net/videos/jack-black-plays-brutal-legend/">Added 1 video to 'Videos' section</a></span>
                     </li>
                     <li>
                        <p><a href="http://www.brutallegend.net/videos/"><img class="alignnone size-thumbnail wp-image-5505" title="brutal_legend_20091008211728" src="http://cdn.brutallegend.net/media/brutal_legend_20091008211728-175x131.jpg" alt="brutal_legend_20091008211728" width="175" height="131" /></a></p>
                        <span class="hidden"><strong>2</strong> weeks, <strong>1</strong> day ago: <a href="http://www.brutallegend.net/videos/">Added 4 videos to 'Videos' section</a></span>
 
                     </li>
                     <li>
                        <p><a href="http://www.brutallegend.net/fan-art/brutal_legend_20091007093843/"><img class="alignnone size-thumbnail wp-image-5490" title="brutal_legend_20091007093843" src="http://cdn.brutallegend.net/media/brutal_legend_20091007093843-175x131.jpg" alt="brutal_legend_20091007093843" width="175" height="131" /></a></p>
                        <span class="hidden"><strong>2</strong> weeks, <strong>3</strong> days ago: <a href="http://www.brutallegend.net/fan-art/brutal_legend_20091007093843/">Added 1 image to 'Fan Art' gallery</a></span>
                     </li>
 
                  </ul>
               </div>


I'm really struggling to work out where this could be coming from. Sad
Hi

I have the same problem and can't find a way around it. Help appreciated.

Peter
Remove the title attribute of the images when you've initialised the qTips Smile

JS Code
$('div.site_updates ul li').each(function(){
	$(this).qtip({
		content: $(this).children('span.hidden')
		// Other options here
	})
 
	// Remove all image titles within the LI elements
	.find('img').removeAttr('title');
});
Reference URL's