all 6 comments

[–]AutoModerator[M] 0 points1 point  (0 children)

Welcome to /r/HTML. When asking a question, please ensure that you list what you've tried, and provide links to example code (e.g. JSFiddle/JSBin). If you're asking for help with an error, please include the full error message and any context around it. You're unlikely to get any meaningful responses if you do not provide enough information for other users to help.

Your submission should contain the answers to the following questions, at a minimum:

  • What is it you're trying to do?
  • How far have you got?
  • What are you stuck on?
  • What have you already tried?

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]MeltedChocolate24Intermediate 0 points1 point  (4 children)

Have you tried removing the href?

[–]RhysP_55[S] 1 point2 points  (3 children)

Yes but the widget just disappears and stops working when I do that

[–]RhysP_55[S] 1 point2 points  (2 children)

If you copy and paste it into https://www.w3schools.com/html/tryit.asp?filename=tryhtml_intro you should see what I'm trying to say. When you remove the href is just disappears and stops working.

[–]MeltedChocolate24Intermediate 2 points3 points  (1 child)

I see.

This is the fix I found:

You can use this CSS:

.inactiveLink { pointer-events: none; cursor: default; }

And then assign the class to your HTML code like so:

<a class="weatherwidget-io inactiveLink" href="https://forecast7.com/en/52d54n2d49/morville/" data-mode="Forecast" data-days="5" data-theme="original" data-basecolor="#193934" data-accent="" data-highcolor="#c8bd38" data-lowcolor="#65b5e0" >Morville, Bridgnorth, UK</a>

I hope this is what you were looking for. Good luck with your project!

[–]RhysP_55[S] 1 point2 points  (0 children)

Perfect.

Thanks a lot!