w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
JQuery '.length' property returns incorrect value when checking characters length in a div

Use $.trim()

var char_count = $.trim($(this).text()).length;

Demo ---> http://jsfiddle.net/k5B32/8/





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.