JavaScript, generate accessible table of content (TOC)

22 February 2014 | Category: Accessibility, JavaScript | Comments (0)

I’ve created simple and accessible script for generating table of content based on HTML header elements. Try example. The source code you can find on[……]

Read more about post JavaScript, generate accessible table of content (TOC)

contenteditable and prevent from going to new line using ENTER key

3 February 2014 | Category: Browsers, JavaScript | Comments (0)

Let’s say we have a simple div HTML element with attribute contenteditable. Sometimes we want to observe ENTER key and prevent cursor to go to new lin[……]

Read more about post contenteditable and prevent from going to new line using ENTER key

JS Tip: How to check if specified HTML element is supported by the browser

11 November 2013 | Category: Browsers, JavaScript | Comments (0)

To check if browser support specified HTML element you can use:

function isHTMLElementSupported(elm) {
    return (Object.prototype.toString.call([......]

Read more about post JS Tip: How to check if specified HTML element is supported by the browser

How to check if browser supports cookies using client-side technique

29 September 2013 | Category: Browsers, JavaScript | Comments (0)

Introduction

There is at least (which I know) two methods to find out if cookies are enabled or not. You can use client-side script techniques or s[……]

Read more about post How to check if browser supports cookies using client-side technique

Simple date picker

20 September 2013 | Category: General, JavaScript | Comments (2)

Basic information’s

I’ve created simple date picker using just JavaScript and CSS. Yes, there is a lot of date pickers, but not like this one 😀 Anyw[……]

Read more about post Simple date picker

JS tip: always use full reference

17 August 2013 | Category: Browsers, JavaScript, Optimizing | Comments (0)

Let’s say we have an example of code like this:

(function(){

    function close_window() {
        if (typeof self.close === 'function') {[......]

Read more about post JS tip: always use full reference

Get HTML img element reference by document.getElementById vs document.images

30 June 2013 | Category: JavaScript, Optimizing | Comments (0)

document.images returns a collection of the images in the current HTML document. Well, I assumed that it could be faster to get image reference by usi[……]

Read more about post Get HTML img element reference by document.getElementById vs document.images

3 ways to check if object do not contains any properties (is “empty”)

26 April 2013 | Category: JavaScript | Comments (0)

During some tests I found at least 3 ways to check if object “is empty”. I mean, do not contains any enumerable properties. Assuming we have an object[……]

Read more about post 3 ways to check if object do not contains any properties (is “empty”)

Detect browser cookie third party support using feature detection

10 March 2013 | Category: Browsers, JavaScript, PHP | Comments (4)

So, you want to detect browser cookie third party support.

What is third-party cookies

Basically, third-party cookies are cookies that are set[……]

Read more about post Detect browser cookie third party support using feature detection

JavaScript, split and non-breaking space

12 August 2012 | Category: JavaScript | Comments (0)

I created and added pre element with contentEditable attribute. I inserted some text with non-breaking space and tried to get text and split using sim[……]

Read more about post JavaScript, split and non-breaking space

« go backkeep looking »