Month: December 2013

Checking if String is a Palindrome with JavaScript

A palindrome is a word, phrase, number, or other sequence of symbols or elements, whose meaning may be interpreted the same way in either forward or reverse direction. It is not uncommon to be asked to write a JavaScript function that checks if a string is a palindrome on front-end developer position interview.

Here’s one possible solution, utilizing a few JavaScript array methods (split(), reverse() and join()). Of course, if you don’t want to get that sophisticated, a simple one-line solution can be easily extracted from the class.

Merry Christmas! Find more front-end experiments and insight here.

Related Posts and Links

Advertisements

CSS3 and JavaScript Image Slideshow Viewer

Try Semtex – the new HTML5, CSS3 and JavaScript UI framework!

I promise, this is the last one for 2013.

What’s already available on my experiments website is this (almost fully) CSS3-driven image slideshow viewer, build with the help of a form, radio buttons, transitions and sibling selectors. It also a supports native keyboard arrow navigation.

JavaScript has been used only for the rendering part, and the class supports various configuration options like bounding box, height, width, additional CSS classes array and default selected slide. The slideshow viewer can be populated either from a local object or via external JSON DTO.

acidjs-css3-slider

Merry Christmas and a Happy New Year! See you in 2014!

Related Posts and Links

Batch Removal of Fake Twitter Followers from Your Browser’s Console

Current status: This solution has stopped working since Twitter introduced the new profile pages. A fix will be provided soon.

Ever had to deal with tons of fake followers? Here is a small script, using Twitter’s REST API that you can run right from your browser’s console to batch remove unwanted users from following you. Once users are blocked, they will be grayed out, so you will be able to decide whether to follow them. Do not worry – users, which you are following will not be blocked, because the script is taking care of that.

thumb

Merry Christmas and a Happy New Year! See you in 2014!

Related Posts and Links

Animated CSS3 Notifications Bar

Try Semtex – the new HTML5, CSS3 and JavaScript UI framework!

The experiment for today is a lightweight and responsive JavaScript-less solution that can be used for displaying important information on the top of a website, purely CSS3-driven and fully customizable in terms of colors, fonts, sizes and default state (expanded or collapsed):

css3-notification-bar

The CSS3 Hello Bar works with all modern browsers plus IE9+ (excluding transitions). Older browsers that do not understand the :root element of CSS3 will not display the bar, which is a good trade-off considering their small market share.

Related Posts and Links

Donation Request

Try Semtex – the new HTML5, CSS3 and JavaScript UI framework!

I started my blog back in 2006 and later, in 2012 the experiments website as places where I could share my experience and insight in front-end development in my spare time, and ever since I’ve been getting thousands of visitors each month. Recently, however, my work load increased, and respectively, I am getting less and less time to maintain them. In order to continue, I’d like to ask for your donations. I’ve never done this before, neither I am sure it would work, and although I hate asking for that, this is the only way to keep them up and running.

Please, participate if you are happy with what you found here to make a donation.

paypal-donate-button