The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

CSS code failing to change my cursor appearance

View previous topic View next topic Go down

Solved CSS code failing to change my cursor appearance

Post by Breeh on March 6th 2015, 1:17 am

Technical Details

Forum version : phpBB2
Position : Founder
Concerned browser(s) : Google Chrome
Who the problem concerns : All members
When the problem appeared : Just as I've added the CSS code that changes the cursor appearance.
Forum link : http://united-lolies.forum.st/

Description of problem

Hello,

So I've got this cursor problem. The cursor is still default after I've added the code, while the hover cursor is looking same as the one on the link I've put in it.

Here's what I used:
Code:
body {
cursor: url(http://i.imgur.com/kQMDTxl.png), progress;
}
a:hover {
cursor: url(http://i.imgur.com/mECm0WX.png), default;
}


Last edited by Breeh on March 6th 2015, 1:47 am; edited 1 time in total

Breeh
New Member

Posts : 21
Reputation : 1
Language : Serbian, Spanish, English, Turkish

http://united-lolies.forum.st/

Back to top Go down

Solved Re: CSS code failing to change my cursor appearance

Post by Ange Tuteur on March 6th 2015, 1:42 am

Hi @Breeh,

The CSS above looks perfect. The problem is that you have some JavaScript in your CSS stylesheet. JS doesn't belong in the CSS stylesheet so it's bound to cause errors. Remove the following from your stylesheet :
Code:
$(function () {
    if (document.forms.post && document.forms.post.t) {
      var p = document.forms.post;
      $(p).submit(function() {
        p.message.value = p.message.value.replace(/(?:\W|^)@(?!\[url)(\S+)/g, function(m, user) {
            if(confirm('Would you like to send ' + user + ' a notification of your mention?')) {
              $.post('/privmsg', 'folder=inbox&post=1&mode=post&subject=I+tagged+you&username%5B%5D=' + user + '&message=You+have+been+tagged+in+the+following+post:+' + encodeURIComponent('http://' + location.hostname + '/t' + p.t.value + '-#bottomtitle'));
            }
            return m;
        });
      });
  }
  for(var i = 0, post = $('.post .content, .post .post-entry, .post .entry-content'), p; (p = post[i++]); ) {
      p.innerHTML = p.innerHTML.replace(/(?:\W|^)@(?!\[url)(\S+)/g, '@$1');
  }
});

It should be right above this style rule :
Code:
body {
cursor: url(http://i.imgur.com/kQMDTxl.png), progress;
}


Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: CSS code failing to change my cursor appearance

Post by Breeh on March 6th 2015, 1:45 am

Thank you! ^^

Breeh
New Member

Posts : 21
Reputation : 1
Language : Serbian, Spanish, English, Turkish

http://united-lolies.forum.st/

Back to top Go down

Solved Re: CSS code failing to change my cursor appearance

Post by Ange Tuteur on March 6th 2015, 2:43 am

You're welcome ^^

Topic archived

Have a nice day Smile

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


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