I have a view displaying the Titles of latest news from the news section on the homepage. I am trying to use Beauty Tips to display the content when the user hovers over the news title that is in the sidebar. I have a beautiful BeautyTip box coming when I hover over the view, but there is no content being displayed in it. I checked using the firebug and found that there is indeed some content in the "bt-xtitle" tag.
Here is how I created the view and how I am trying to use beauty tips with it. If there is any thing I am missing kindly point out.
I attached an image of my view to the post.
In the header of the view I have the php code for setting the properties of the tip.

<?php
//Beauty tips for news section
 
			$options['mainnews'] = array(
			'area' => '.mainnews',
                        'contentSelector' => '$(this).attr("alt")',
			'trigger' => array(0 => 'mouseover'),
                        'width' => 300,
		);
  beautytips_add_beautytips($options);
?>

Comments

peter-boeren’s picture

If bt-xtitle is set, can't you use this in the contentSelector?

 'contentSelector' => '$(this).attr("bt-xtitle")',
drupaledmonk’s picture

Status: Active » Closed (fixed)

Thanks a lot!!
I should have followed up on this issue once I have solved it.

The Greenman-dupe’s picture

Im currently trying to implement some thing like this.

only problem is getting my function to call the beauty tips. currently i can hover over my links and see a default alt tag with the contents in which i want to display. (www.Skiptax.com)

I am using this code within my template.php to call the function under preprocess block

if( module_exists('beautytips') ) {
$options['bt_brazil_blocks'] = array(
'area' => '#block-views-newnewnew-block_1 .views-field-title a',
'contentSelector' => '$(this).attr("title")',
'trigger' => array(0 => 'mouseover'),
'width' => 300,
);
beautytips_add_beautytips($options);
}

problem is that im currently not being shown a beautytips box with the title attribute contents. what is happening is im being given a error through Fire bug . . . .

Drupal.settings.beautytips_defaults is null
[Break on this error] if ( Drupal.settings.beautytips_defaults['css_list'].length > 0) {

this is within the beautytips.js file !
is there any one which can give me a hand and point me to where this might be going wrong ?
cheers

Mike