The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

trying to fix Display a preview of the user profile on hover

3 posters

Go down

Solved trying to fix Display a preview of the user profile on hover

Post by Goppyrules Thu May 18, 2017 4:11 pm

i been trying to use this javascript from http://fmdesign.forumotion.com/t404-display-a-preview-of-the-user-profile-on-hover#3246and its not working:
Code:
$(function() {
          var links = $('a[href^="/u"]').filter(function() {
            if (this.firstChild && this.firstChild.tagName) {
              if (this.firstChild.tagName != 'IMG') {
                return this;
              }
            } else {
              return this;
            }
          }),
           
          usersinfo = {};
       
          links.tooltipster && links.not('.mentiontag, .tooltipstered').filter(function() {
            if (!$(this).closest('#tabs')[0]) {
              return this;
            }
          }).tooltipster({
            animation : 'fade',
            interactive : true,
            contentAsHTML : true,
            minWidth : 300,
            maxWidth : 300,
            delay : 500,
            arrowColor : "#EEE",
            autoClose : true,
            content : 'Loading...',
            functionBefore: function(origin, continueTooltip) {
              continueTooltip();
       
              var userid = $(this).attr('href').replace(/.*?\/u(\d+).*/, '$1');
              if (origin.data('ajax') !== 'cached') {
                if (usersinfo[userid] != undefined) {
                  origin.tooltipster('content', usersinfo[userid]).data('ajax', 'cached');
                } else {
                  $.ajax({
                    type: 'GET',
                    url: "/ajax/index.php",
                    dataType: "html",
                 
                    data: {
                      f: "m",
                      user_id: userid
                    },
       
                    success: function(html) {
                      usersinfo[userid] = html;
                      origin.tooltipster('content', html).data('ajax', 'cached');
                    }
                  });
                }
              }
            }
          });
        });


Last edited by Goppyrules on Thu May 18, 2017 11:48 pm; edited 1 time in total
avatar
Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

Solved Re: trying to fix Display a preview of the user profile on hover

Post by Ange Tuteur Thu May 18, 2017 6:34 pm

Hi @Goppyrules,

Please provide a link to your forum so that I may inspect the issue.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13207
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: trying to fix Display a preview of the user profile on hover

Post by Goppyrules Thu May 18, 2017 7:04 pm

Ange Tuteur wrote:Hi @Goppyrules,

Please provide a link to your forum so that I may inspect the issue.

http://monarchduelacademy.forumotion.me/forum
avatar
Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

Solved Re: trying to fix Display a preview of the user profile on hover

Post by Ange Tuteur Thu May 18, 2017 7:14 pm

You have a JavaScript error on your forum that's preventing it from working :
trying to fix Display a preview of the user profile on hover Captur43

Look for a script that contains content similar to the code below and remove it:
Code:
content="summary"/><meta name="twitter:site"content="@Forumotion"/><meta name="twitter:title"content="Alpha Knights Academy"/><meta property="og:description"content="Here at Alpha Knights Academy, we play Yu-Gi-Oh! Come and join us. Have fun! "/><meta name="title"content="Alpha Knights Academy"/><link rel="stylesheet"href="/0-ltr.css"type="text/css"/><link rel="search" type="application/opensearchdescription+xml" href="/improvedsearch.xml" title="Alpha Knight Forums" /><link rel="search" type="application/opensearchdescription+xml" href="https:$(document).ready(function(){});<script type="text/javascript"src="https://static.criteo.net/js/ld/publishertag.js"></script><script type="text/javascript"src="https://illiweb.com/rs3/98/frm/mentions/tooltipster.js"></script><script type="text/javascript"src="https://illiweb.com/rs3/98/frm/mentions/init.js"></script><script type="text/javascript"src="https://illiweb.com/rs3/98/frm/jquery/cookie/jquery.cookie.js"></script><script type="text/javascript"src="https://illiweb.com/rs3/98/frm/jquery/toolbar/FAToolbar.js"></script><script type="text/javascript"src="https://illiweb.com/rs3/98/frm/json/json2.js"></script><script type="text/javascript"src="https://illiweb.com/rs3/98/frm/jquery/printf/printf.js"></script><script type="text/javascript"src="https://illiweb.com/rs3/98/frm/jquery/dotdotdot/jquery.dotdotdot-1.5.6.js"></script><script type="text/javascript"src="https://illiweb.com/rs3/98/frm/jquery/notif/FA.js"></script><script type="text/javascript">
You'll most likely have to go through each script one by one until you find it. I recommend looking for a specific portion of the code and not the whole thing, since it'll be easier to find that way.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13207
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: trying to fix Display a preview of the user profile on hover

Post by Goppyrules Thu May 18, 2017 11:49 pm

it works now. thank you for your help. problem solved.
avatar
Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

Solved Re: trying to fix Display a preview of the user profile on hover

Post by SLGray Fri May 19, 2017 2:36 am

Problem solved & topic archived.
Please read our forum rules: ESF General Rules


trying to fix Display a preview of the user profile on hover Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51555
Reputation : 3524
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum