|
One option is
1) put the div class name and associated url into an "associative" array where the class name is the array key and the class' url is the value
2) put an onclick event handler on each div which calls a single function.
3) pass the div's object reference (this) to the function in 2) when the div is clicked.
4) the function in 2) then opens a new page according to the className associated with the this object.
The new page's url is got from the array in 1)
|