Hey guys,
I’ve got a script that lists out data in rows (using <li> lists), if a user clicks on one of the entries it brings up a JS piemenu that has options like “Add to wishlist”, etc… Well, I would like to get rid of that piemenu and only have text links next to each entry that are commands to do the same thing as the pie menu, but eliminating the step of clicking to open the menu.
So one command in the menu it opens upon clicking is “addWishlist” – I would like this to be simply next to the list item, which gets put in the “entrytitle” div. Below is the code that generates the lists themselves. I would like to put an <a href=”javascript:addWishlist(target)”>Add to wishlist</a> link next to each one, but I really do not know what to put exactly, anything I’ve done with ‘prepend’ to get it to show up, ultimately makes an error when I click it.
Thanks
[CODE] if(col_title_array[part_num] != ”) {
var list = document.getElementById(‘entrylist’);
var newNode = document.createElement(“li”);
newNode.setAttribute(‘id’,col_array[part_num+1]);
newNode.className = “entry”;
$(newNode).hover( function(){$(this).addClass(“hover”);}, function(){$(this).removeClass(“hover”); });
div = document.createElement(“div”);
div.className = “entry-title”;
$(div).html( col_title_array[part_num] );
$(newNode).prepend( “<img src=’images/grip.gif’ class=’grip’/>” );
$(newNode).prepend( div );