Currently browsing JavaScript

Unsupported Browser Detection
Ciprian on Wednesday, July 22, 2020 — 1,357 Views

Switching From JavaScript to PHP for Browser Detection and Avoiding Core Web Vitals Penalties

In the light of the recently introduced Core Web Vitals, I decided to save some script start-up speed and switch to PHP browser [...]

JavaScript Boxed Carousel
Ciprian on Monday, June 15, 2020 — 1,119 Views

Experiment: JavaScript Boxed Carousel with Progress Indicator

Here's an awesome JavaScript carousel built for a client project, but then scrapped. It definitely has potential for unlimited items. [...]

Ciprian on Friday, August 30, 2019 — 4,204 Views

How to Change Page Title Using JavaScript

This JavaScript will modify the text of the browser tab when a visitor focuses or un-focuses the tab. You can display one title when a [...]

Ciprian on Wednesday, August 28, 2019 — 559 Views

How to Populate OpenStreetMap with Foursquare Venues/Amenities

First of all, we need a Foursquare app and a client ID and secret. Head over to and get your free account. Follow [...]

Ciprian on Wednesday, August 28, 2019 — 996 Views

WordPress Responseless XHR Request Using JavaScript

A responseless XHR (POST) request is a request which does not require any user feedback, such as storing post views or saving data in the [...]

Ciprian on Thursday, August 22, 2019 — 1,581 Views

How to track and measure phone number views with JavaScript

Use this tutorial to create phone number links and track/measure views. As phone numbers are clickable (and work) only on mobile devices, [...]

Ciprian on Thursday, August 22, 2019 — 6,913 Views

How to show an outdated browser alert on Internet Explorer 11

Here’s a nice overview on why Internet Explorer 11 should be phased out and users blocked from viewing the site content when using [...]

Ciprian on Thursday, August 22, 2019 — 1,200 Views

Native JavaScript hasClass()

These JavaScript snippets implement a native hasClass() function (inspired by jQuery and dubbed elementHasClass()), which checks if an [...]

Ciprian on Thursday, August 22, 2019 — 1,043 Views

How to extract a value from an element and, optionally, round it

This JavaScript snippet will extract a price from a DOM element, remove all alphanumeric characters, such as currency or symbols or other [...]

Ciprian on Thursday, August 22, 2019 — 2,318 Views

How to hide an element using JavaScript

Here are 3 methods to hide an element using JavaScript. How to hide an element using JavaScript? Set native display style to none Set CSS [...]

Ciprian on Wednesday, August 21, 2019 — 422 Views

End of an Era: Travel SEO

I’ll just leave this here for reference purposes and I won’t explain any code, as it’s obsolete and I’m not using [...]

JavaScript Logo
Ciprian on Wednesday, July 17, 2019 — 542 Views

How to Create a Programmatic JavaScript Tooltip

Here’s a short tutorial on how to create a programmatic JavaScript tooltip. I needed this feature to recreate a product tour without [...]

Privacy Policy