dave14305
Part of the Furniture
[Fork] Asuswrt-Merlin 374.43 LTS releases (V44E5)Anyone have an idea why this JavaScript / jquery code does not work on John's fork but happily in Merlin's?
The console error is for the first $('#thisContent').load('/user/diversion/div-index.html');Code:if (custom_settings.Div_p_page !== undefined) { if (custom_settings.Div_p_page == "index") { $('#thisContent').load('/user/diversion/div-index.html'); } else { $('#thisContent').load('/user/diversion/div-lists.html'); } }
TypeError: $(...) is null
id #thisContent is set in <td bgcolor="#4D595D" colspan="3" valign="top" id="thisContent"></td>
I'm loading these js files, jquery is from Merlins, but even with johns built in it does not work:
Code:/user/diversion/div-jquery.js /state.js /general.js /popup.js /help.js /detect.js /base64.js
You would need to use a jQuery.noConflict() statement and replace $ with $j.
Code:
var $j=jQuery.noConflict();
...
if (custom_settings.Div_p_page !== undefined) {
if (custom_settings.Div_p_page == "index") {
$j('#thisContent').load('/user/diversion/div-index.html');
} else {
$j('#thisContent').load('/user/diversion/div-lists.html');
}
}