In order to change the color of the jQuery event on right click using context menu , I got some assistance from here with the answer with the most votes.
Making custom right-click context menus for my web-app
However, I am trying to change the color of the even on right click so this is what I did :-
$(".custom-menu li").click(function(){
// This is the triggered action name
switch($(this).attr("data-action")) {
// A case for each action. Your actions here
case "red" :
//alert("RED");
$('#calendar').fullCalendar({
editable: false,
backgroundColor: "#800637"
});
break;
case "green":
$('#calendar').fullCalendar({
editable: false,
backgroundColor: "#00ff00"
});
break;
}
// Hide it AFTER the action was triggered
$(".custom-menu").hide(100);
});
And the HTML for the right click custom event looks like this :-
<ul class="custom-menu">
<li data-action="red" data-color="red">Red/Rouge</li>
<li data-action="green" data-color="green">Green/Verg</li>
</ul>
And the CSS for the color change looks like this :
.red{
background-color: red;
}
.green{
background-color: green;
}
This is how it looks but at the moment the color does not change. Full Calendar view