Show/Hide feature using HTML only - html

I want to create an element where it performs a show/hide functionality of text when a user clicks on a button. I've found a helpful page through this link: http://www.meadinkent.co.uk/expand_sections.htm
The only issue I have is that it uses javascript. As I want to place this into Sharepoint, what Sharepoint does is remove the <script> everytime it's submitted, so javascript I'm assuming can't be used.
I want to know if there is a way to perform the same functionality as displayed in the page but with HTML only?
Thank you

You can add js by using Embed Code web part. Just go "Insert tab" and click "Embed Code". Then edit this and you will able to use js, css, html. So, you can use your helpful link.
Embed code webpart

You can use CSS to show/hide text. You can vist the following links, which may help you.
1) https://alexcican.com/post/hide-and-show-div/
2) How to show/hide div on click with stricly HTML/CSS

Related

HTML Add To Calendar Button

I would like to code a button that allows to add an event to a calendar just by using HTML and CSS. I saw similar solutions including Javascript code but I am working on a solution that doesn't allow JS code in his "raw text" section.
Is that even possible ?
I don't think so, HTML and CSS are just to format a page.

Facebook Like Button Code won't work in HTML Email

I am trying to add the like button code into a html newsletter but it won't display, only displays on the online version. Is it possible to have it display in the email newsletter as well, if so, how?
No this is not possible. The best you can do is a static like button image that takes you to your fan page or website where they can then click on a real like button. You can't embed scripts into email and have them execute, which is required to convert the like button code into the necessary rendered iframe.
An alternative to using the 'like button' is using the html only share button. Technically its not supported, but hey it works.
http://www.facebook.com/sharer.php?u=http://mylink.com
You cannot use javascript directly on emails.
But you can put a button/link to a page of your own, whose purpose is to hold the actual like button.

Can I disable an address link in HTML?

I have the following:
Overview
Review
When I am on the overview page I want to make it so that clicking the overview address link does nothing. Something like disable for a button. Is this possible for an address link?
This should do it:
Overview
Of interest may also be nofollow:
Overview
The easiest way to disable a link is probably to remove the href value.
If you are rendering this from MVC, simply don't include the <a> tag.
It's a little unclear what is best for what you're trying to do.
Add 'return false' to prevent linking:
Overview
Just use a # sign in the href like so: Overview
You could do this with a layer of javascript on top of each page: your JS script would run and check all the links on the page -- if the link is the same as the page you are on then simply "hijack" the anchor by adding an onclick event which does nothing and doesn't bubble up the event.
This was you still pump out from your server side all the links -- and the script would be the same for all the pages, thus allowing it to be cached by the browser and only loaded once (assuming you place it in an external .js file).
You can try <a class="inactive" href="#">Overview</a> and give it some CSS to show it's a different type of link.

Using an HTML select list as link list

I have seen some solutions on how to use a dropdown list in HTML as a combo link list with JS. Is there possibly a way to do it without JS directly with HTML?
Maybe sth with method="link"?
Without JS? Yes, do it server side (issuing an HTTP redirect in response to a form submission)
Directly with HTML? No.
It isn't a nice UI design though. Having links people can see without clicking, and can activate with a single click is much nicer.

Creating tabs using HTML and loading different content, for click of each tab

I need to create tabs on the webpage using html, and on click of each tab, need to load different content on the same page. Do let me know how to go about this, or any useful links that might help me.
Thanks,
Geetha
This can be done with jQuery and jQuery UI.
Here you can find some information about it. http://www.stilbuero.de/jquery/tabs_3/
Dojo (javascript framework) has a TabContainer. It's easy to implement, but depends on the content and how do you want to present it to the user.
You can start by looking here: Dojo TabContainer info
There's an example on that site which lets you see the html and javascript required to build a tabbed container.