67
rated 0 times
[
73]
[
6]
/ answers: 1 / hits: 22836
/ 12 Years ago, tue, november 6, 2012, 12:00:00
I'm looking for a jQuery method to merge two arrays so that their values alternate:
var array1 = [1,2,3,4,5];
var array2 = ['a', 'b', 'c', 'd', 'e'];
The result I want is:
var arrayCombined = [1, 'a', 2, 'b', 3, 'c', 4, 'd', 5, 'e'];
Please note that I know it is trivial to do this in JS, however I am after a jQuery method that will do this.
More From » jquery