WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Shortcode – script adds a question mark and blinking

[Resolved] Shortcode – script adds a question mark and blinking

Viewing 15 replies - 1 through 15 (of 26 total)
  • M

    @motylanogha

    When I use it as:

    <img title="<b>1GHz technology</b> - blah blah" rel="tooltip" alt="icon" src="source/file.png" /></li>

    html tags are stripped and nothing showes up… ;(

    M

    @motylanogha

    What I would do is to show up plugin in no conflict mode (responsive-tooltip.js) like:

    var jq142 = jQuery.noConflict();
    
    	jq142( document ).ready( function()
    		{
    			var targets = jq142( '[rel~=tooltip]' ),
    				target	= false,
    				tooltip = false,
    				title	= false;
    
    			targets.bind( 'mouseenter', function()
    			{
    				target	= jq142( this );
    				tip		= target.attr( 'title' );
    				tooltip	= jq142( '<div id="tooltip"></div>' );
    
    				if( !tip || tip == '' )
    					return false;
    
    				target.removeAttr( 'title' );
    				tooltip.css( 'opacity', 0 )
    					   .html( tip )
    					   .appendTo( 'body' );
    
    				var init_tooltip = function()
    				{
    					if( jq142( window ).width() < tooltip.outerWidth() * 1.5 )
    						tooltip.css( 'max-width', jq142( window ).width() / 2 );
    					else
    						tooltip.css( 'max-width', 340 );
    
    					var pos_left = target.offset().left + ( target.outerWidth() / 2 ) - ( tooltip.outerWidth() / 2 ),
    						pos_top	 = target.offset().top - tooltip.outerHeight() - 20;
    
    					if( pos_left < 0 )
    					{
    						pos_left = target.offset().left + target.outerWidth() / 2 - 20;
    						tooltip.addClass( 'left' );
    					}
    					else
    						tooltip.removeClass( 'left' );
    
    					if( pos_left + tooltip.outerWidth() > jq142( window ).width() )
    					{
    						pos_left = target.offset().left - tooltip.outerWidth() + target.outerWidth() / 2 + 20;
    						tooltip.addClass( 'right' );
    					}
    					else
    						tooltip.removeClass( 'right' );
    
    					if( pos_top < 0 )
    					{
    						var pos_top	 = target.offset().top + target.outerHeight();
    						tooltip.addClass( 'top' );
    					}
    					else
    						tooltip.removeClass( 'top' );
    
    					tooltip.css( { left: pos_left, top: pos_top } )
    						   .animate( { top: '+=10', opacity: 1 }, 50 );
    				};
    
    				init_tooltip();
    				jq142( window ).resize( init_tooltip );
    
    				var remove_tooltip = function()
    				{
    					tooltip.animate( { top: '-=10', opacity: 0 }, 50, function()
    					{
    						jq142( this ).remove();
    					});
    
    					target.attr( 'title', tip );
    				};
    
    				target.bind( 'mouseleave', remove_tooltip );
    				tooltip.bind( 'click', remove_tooltip );
    			});
    		});

    But it still does not work..

    Plugin Author ItayXD

    @itayxd

    I’ll look into it, can you link me to your website so I can check it live?
    And Js conflict is highly unlikely I dont think any script but jQuery uses jQuery()… (As you can see I’m not using $()).

    M

    @motylanogha

    could u please let me know about your email?
    I’d send you private message.

    thanks.

    Plugin Author ItayXD

    @itayxd

    I got your email, I’m looking into it.

    Plugin Author ItayXD

    @itayxd

    I checked you example and it works perfectly for me…

    M

    @motylanogha

    check your email please.

    Plugin Author ItayXD

    @itayxd

    I emailed you back a tested solution… problem solved as far as I can tell.
    If you like my plugin please add a review 😀

    Plugin Author ItayXD

    @itayxd

    I understand everything works now, marking as solved…

    Hi, I’m getting the same problem. Can you let me know how to resolve the issue. Thanks in advance.

    Plugin Author ItayXD

    @itayxd

    Can you link me to the page the problem occur?

    I am also getting blinking/flashing on the tooltip pop-up box.

    You can see it in my Mortgage/Loan calculator widget on the “?” image next “Purchase price:” (in the right sidebar)

    http://www.thetestwebpage.com

    Thanks!

    Plugin Author ItayXD

    @itayxd

    Hi AgentJay, I wasn’t able to reproduce your problem. When I go to that website and check that questionmark I see the tooltip perfectly.
    I tested both FF and chrome (can’t test IE as I’m a proud Ubuntu user. try it out!), what browser are you using? which version? what OS?
    Thanks

    In FF it does seem to work perfectly! (I didn’t check it before)
    But in Chrome it’s still flashing, I also just noticed that it is not offsetting either (the tool tip box is loading with the mouse pointer in the center of the box, making the box appear too low)

    I’ll also look into some CSS code to see if there’s something that can be done.

    My chrome version is: Version 28.0.1500.72 m (the latest one according to the updater)

    Plugin Author ItayXD

    @itayxd

    I’m using version 28.0.1500.52, there shouldn’t be any difference…
    What OS are you using? that is very weird that such a difference exists

Viewing 15 replies - 1 through 15 (of 26 total)
  • The topic ‘[Resolved] Shortcode – script adds a question mark and blinking’ is closed to new replies.