my problem is with appending a array into existing div as a text. I cant figure it out why its not working, so i have this code:
var raya = ui.item.value + ' ';
$('#result').append(raya);
var tor = $("#result").text();
Above code is working, the value of raya (which is string) is appended correctly into #result
Problem comes here, the value of array1 is not appended to #result2 and ideas why its not working?
var array1 = new Array();
array1 = tor.split( " " );
array1 = $.unique(array1);
$('#result2').append(array1);
return false;
(just to mention that everything is holded in 1 function, this cant be the reason, but just to know)
arra1with an empty array. You could even write e.g.:var new_tor = $.unique(tor.split(' ')).join(' ');