0
jQuery AJAX를 통해 웹 페이지를로드하려고합니다. 마스터 페이지를 통해 호출 된 인덱스 페이지에서 메뉴를 클릭하면됩니다. 페이지가 잘로드 중입니다. 그 장바구니 타입의 것. 페이지의 다양한 기능은 자바 스크립트에 의존합니다. 일부 스크립트는 잘 작동하지만 다른 스크립트는 제대로 작동하지 않습니다. 다음은 내 아약스 코드입니다 ....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();
});
});
});
}
});