Tag: HTML
-
How to Customise ShareThis Settings – ShareThis
Hey everyone, I’ve just added ShareThis to a website I’m currently working on. It’s basically a generator for all your typical social network plugins (Facebook Like, Twitter Share, Google+ etc). The main advantage I’ve found with using it is the detailed analytics. While I haven’t had any major issues, there were a few customisations I…
-
Stop a Link from Going Anywhere – CSS/JavaScript
Hey everyone, Another quick one – how to stop a link from doing anything. I’ve just come across a need to use a link that acts as a button. A slight UI issue with this is that clicking a hyperlink will with an href value of ‘#’ will push scroll to the top of the…
-
FullCalendar Example with Client-Side Event Updates
Hey everyone, I’ve been mucking around with FullCalendar recently and decided to share one of the prototypes I’ve ended up with. It basically lets the user change the events without having to do a postback. A user simply has to click the event, type in the changes and hit update. I’ve posted the code below,…
-
How to Reset ID of an Element – jQuery
Hey All, Just a quick post on how to set the ID of an element (in this case a div) with jQuery. I needed to use this to dynamically clone elements. WOOOOOOOOOOOOW $(‘#my_test_id’).attr(‘id’, ‘my_new_id’); The script above sets the id of div to my_new_id. If you’re interested, there’s a whole heap of documentation on the…
-
Allow HTML String – Ruby on Rails
Just a quick post on how to prevent escaping for HTML within a string. Simply use html_safe?. i.e. The following will show the bold tags as text: <%= "GOOOOOOOGLE”> <b>GOOOOOOOGLE</b> Whereas once we add html_safe the text will be displayed in bold: <%= ("GOOOOOOOGLE”).html_safe?> GOOOOOOOGLE
-
PaperClip Issues – Ruby on Rails
I finally decided to replace all my existing code to handle images with Paperclip. I was following the screencast by Emerson Lackey, #134 Paperclip, however I ran into a couple of issues. Thankfully they were all very easily fixed, and probably wouldn’t have occurred at all if I’d simply watched the whole screencast instead of…
-
Copying Text from Notepad++ to Microsoft Word
In the middle of doing up some documentation I realised that the formatting and colors aren’t kept when you copy and paste from Notepad++ to Microsoft Word. Luckily Google was able to help out by showing me default plugin that lets you keep all the syntax highlighting etc. 1: Hightlight any of the text you…