Skip to content

Commit b25a5ae

Browse files
committed
removed .read / .load
1 parent a5d20f9 commit b25a5ae

File tree

1 file changed

+30
-38
lines changed

1 file changed

+30
-38
lines changed

assets/js/admin.js

Lines changed: 30 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -30,47 +30,39 @@ jQuery(function () {
3030
switchBlock("#extraCallsBlock", "#extraCallsEnable");
3131
switchBlock("#easingBlock", "#easing");
3232

33-
jQuery(document).ready(function () {
34-
jQuery(".slider-horizontal").each(function () {
35-
var mySl = jQuery(this);
36-
var defaultState = mySl.prev('input').val();
37-
mySl.attr('defSl', defaultState);
38-
});
39-
40-
41-
42-
43-
//Function enable codemirror on FancyBox Extra Calls
44-
45-
jQuery('.start-editing').on('click', function () {
46-
wp.codeEditor.initialize(jQuery(this).next("textarea"));
47-
jQuery(this).hide();
48-
});
49-
33+
jQuery(".slider-horizontal").each(function () {
34+
var mySl = jQuery(this);
35+
var defaultState = mySl.prev('input').val();
36+
mySl.attr('defSl', defaultState);
37+
});
5038

51-
//add color picker to buttons
52-
jQuery('.color-btn').wpColorPicker();
39+
//Function enable codemirror on FancyBox Extra Calls
40+
jQuery('.start-editing').on('click', function () {
41+
wp.codeEditor.initialize(jQuery(this).next("textarea"));
42+
jQuery(this).hide();
5343
});
5444

55-
jQuery(window).load(function () {
56-
//function to initiate horizontal slider from jQuery UI
57-
jQuery(".slider-horizontal").each(function () {
58-
var mySl = jQuery(this);
59-
var minSl = parseFloat(mySl.attr("minSl"));
60-
var maxSl = parseFloat(mySl.attr("maxSl"));
61-
var defSl = parseFloat(mySl.attr("defSl"));
62-
var stepSl = parseFloat(mySl.attr("stepSl"));
63-
jQuery(this).slider({
64-
orientation: "horizontal",
65-
range: "min",
66-
min: minSl,
67-
max: maxSl,
68-
value: defSl,
69-
step: stepSl,
70-
slide: function (event, ui) {
71-
mySl.prev("input").val(ui.value);
72-
}
73-
});
45+
46+
//add color picker to buttons
47+
jQuery('.color-btn').wpColorPicker();
48+
49+
//function to initiate horizontal slider from jQuery UI
50+
jQuery(".slider-horizontal").each(function () {
51+
var mySl = jQuery(this);
52+
var minSl = parseFloat(mySl.attr("minSl"));
53+
var maxSl = parseFloat(mySl.attr("maxSl"));
54+
var defSl = parseFloat(mySl.attr("defSl"));
55+
var stepSl = parseFloat(mySl.attr("stepSl"));
56+
jQuery(this).slider({
57+
orientation: "horizontal",
58+
range: "min",
59+
min: minSl,
60+
max: maxSl,
61+
value: defSl,
62+
step: stepSl,
63+
slide: function (event, ui) {
64+
mySl.prev("input").val(ui.value);
65+
}
7466
});
7567
});
7668

0 commit comments

Comments
 (0)