Complicated is not always the solution, even if the brain thinks so…

Today I had a customer that wanted a simple way to add a button in the SharePoint content filed.

My first thought was, well why not use jQuery for this… I was testing it out for a while but whatever I did SharePoint automatically cleaned the html/code inside the content filed and I ended up with <button>My Button</button>. Not very useful at all 😉

Then it hit me, why do I even bother using jQuery for this when I can use pure CSS. The only thing I had to do was to add a class to the <a href… and add some styling in the CSS, so freaking simple! This is also something my customer can do in the sleep so to say.

What I want to say with this post is that sometimes we think we need to use some “modern” technology and code to do something when the easiest solution is just in front of us from the beginning.

If you’re interested, this is what I did.

Added the following to the content filed in html mode.

Then added this style in the CSS to get a nice button.


One response to “Complicated is not always the solution, even if the brain thinks so…”

  1. Jon KH says:

    I second that, keep it simple. Why make a job harder than it needs to be 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *