JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://trendznstile.com/context/jquery.chromeContext.js"></script>
<link rel="stylesheet" href="http://trendznstile.com/context/chromeContext.css">
<div id="div_id" >
Right Click Me
</div>
JavaScript
$(function(){
var arr = ['1st Row', '2nd Row', '3rd Row'];
var menuitems = [];
$.each(arr, function( index, value ) {
menuitems[index] = { title: value, onclick: function () { RToTb(array_name) }};
});
$('#div_id').chromeContext({
items : menuitems
});
});