インデックス ページ (マスター ページから呼び出される) のメニューをクリックして、jQuery AJAX 経由で Web ページを読み込もうとしています。ページは正常に読み込まれています。ショッピングカート型のものです。ページのさまざまな機能は JavaScript に依存しています。一部のスクリプトは正常に動作していますが、他のスクリプトは正常に動作していません。これが私のajaxコードです....
$.ajax({
url: "forms.aspx",
success: function (data) {
$('#formsClick').bind('click', function () {
$("#index1").load('forms.aspx #forms1');
$.getScript('../js/libs/modernizr.js');
//color picker
$.getScript('../js/plugins/colorpicker/bootstrap-colorpicker.js', function () {
var $a = jQuery.noConflict();
$a(document).ready(function () {
var preview = $a('.colorpicker-preview')[0].style;
$a('.colorpicker').colorpicker().on('changeColor', function (ev) {
preview.backgroundColor = ev.color.toHex();
});
});
});
//file upload
$.getScript('../js/plugins/fileupload/bootstrap-fileupload.js');
$.getScript('../js/plugins/inputmask/bootstrap-inputmask.js');
//button switch
$.getScript('../js/plugins/bootstrapSwitch/bootstrapSwitch.js', function () {
var $b = jQuery.noConflict();
});
//tags input
var myStylesLocation1 = "css/plugins/jquery.tagsinput.css";
$('<link rel="stylesheet" type="text/css" href="' + myStylesLocation1 + '" >').appendTo("head");
$.getScript('js/plugins/tagsInput/jquery.tagsinput.min.js', function () {
var $c = jQuery.noConflict();
$c(document).ready(function () {
$c('.tagsinput').tagsInput();
});
});
//wysiwyg
var myStylesLocation = "css/plugins/jquery.jwysiwyg.css";
$('<link rel="stylesheet" type="text/css" href="' + myStylesLocation + '" >').appendTo("head");
$.getScript('../js/plugins/jWYSIWYG/jquery.wysiwyg.js', function () {
var $d = jQuery.noConflict();
$d(document).ready(function () {
$d('.wysiwyg').wysiwyg({
controls: {
bold: { visible: true },
italic: { visible: true },
underline: { visible: true },
strikeThrough: { visible: true },
justifyLeft: { visible: true },
justifyCenter: { visible: true },
justifyRight: { visible: true },
justifyFull: { visible: true },
indent: { visible: true },
outdent: { visible: true },
subscript: { visible: true },
superscript: { visible: true },
undo: { visible: true },
redo: { visible: true },
insertOrderedList: { visible: true },
insertUnorderedList: { visible: true },
insertHorizontalRule: { visible: true },
cut: { visible: true },
copy: { visible: true },
paste: { visible: true }
},
events: {
click: function (event) {
if ($d("#click-inform:checked").length > 0) {
event.preventDefault();
alert("You have clicked jWysiwyg content!");
}
}
}
});
});
});
//editor
var myStylesLocation = "css/plugins/bootstrap-wysihtml5.css";
$('<link rel="stylesheet" type="text/css" href="' + myStylesLocation + '" >').appendTo("head");
$.getScript('../js/plugins/wysihtml5/wysihtml5-0.3.0.js');
$.getScript('../js/plugins/wysihtml5/bootstrap-wysihtml5.js', function () {
$(document).ready(function () {
var $e = jQuery.noConflict();
// Note, we are adding .btn-alt to toolbar template directly in bootstrap-wysihtml5.js for better readability
$e('.wysihtml5').wysihtml5();
});
});
//datepicker
$.getScript('js/plugins/datepicker/bootstrap-datepicker.js', function () {
var $f = jQuery.noConflict();
$f(document).ready(function () {
$f('.datepicker').datepicker({
"autoclose": true
});
});
});
//daterange picker
var myStylesLocations = "css/plugins/daterangepicker.css";
$('<link rel="stylesheet" type="text/css" href="' + myStylesLocations + '" >').appendTo("head");
$.getScript('js/plugins/dateRangePicker/date.js');
$.getScript('js/plugins/dateRangePicker/daterangepicker.js', function () {
var $g = jQuery.noConflict();
$g(document).ready(function () {
$g('#demoDaterangePicker').daterangepicker();
});
});
//timepicker
$.getScript('js/plugins/bootstrapTimePicker/bootstrap-timepicker.min.js', function () {
var $h = jQuery.noConflict();
$h(document).ready(function () {
$h('#demoTimepicker').timepicker({
minuteStep: 5,
showInputs: false,
disableFocus: true
});
});
});
//validation
$.getScript('js/plugins/bootstrapValidation/jqBootstrapValidation.min.js', function () {
var $i = jQuery.noConflict();
$i(document).ready(function () {
$("#demoValidation input").jqBootstrapValidation({
submitSuccess: function ($form, event) {
event.preventDefault();
}
});
});
});
$.getScript('js/plugins/prettyCheckable/prettyCheckable.js', function () {
var $j = jQuery.noConflict();
$j(document).ready(function () {
$j('.custom-checkbox input, .custom-radio input').prettyCheckable();
});
});
});
}
});