【发布时间】:2013-05-13 06:24:20
【问题描述】:
可以在子页面中有脚本标签并由Django 渲染它们(子页面已加载/显示)?
我有一个具有这种结构的移动网络应用程序
ROOT
--PAGE1 (here I'd like to have the script rendered by Django)
--PAGE2
--PAGE3
--PAGE4
原因是因为在第二页上我有自定义控件,例如:翻转开关、按钮等,它们将在该页面上执行特定操作。
代码sn-ps:
//This one gets rendered only when root page is loaded
jQuery(document).ready(function($) {
//But the control / html element its on the second page
$("#myswitch").change(function() {
console.log("Switch changed!");
});
});
【问题讨论】:
标签: jquery python django pageload