To bypass passing the id and instead pass an object to JSXGraph, a clever hack can be utilized. Initially, an invisible div with the id "dummy" must be created. The board is then initialized using this dummy id, followed by necessary corrections. For example:
var board = JXG.JSXGraph.initBoard('dummy', {axis:false,
boundingbox: [-10,30,10,-10], keepaspectratio:false});
var obj = document.getElementById('box'); // or this.$('#box')
board.removeEventHandlers();
board.container = 'box';
board.containerObj = obj;
//
// Providing box dimensions
board.renderer = new JXG.SVGRenderer(obj, {width: 800, height: 800});
board.setBoundingBox([-10,30,10,-10], false);
board.addEventHandlers();
It's important to note that setting axis:true or grid:true in initBoard() will not have the desired effect.
Hoping this solution proves helpful,
Alfred