質問編集履歴

3

補足情報

2019/02/25 08:42

投稿

hrsw
hrsw

スコア13

test CHANGED
File without changes
test CHANGED
@@ -123,3 +123,195 @@
123
123
  エディタ:Visual Studio Code
124
124
 
125
125
  言語:HTML5、CSS3、jQuery2.2.4
126
+
127
+
128
+
129
+ 【izimodalのopenに関する記述】
130
+
131
+ ```jQuery
132
+
133
+ open: function (param) {
134
+
135
+
136
+
137
+ var that = this;
138
+
139
+
140
+
141
+ try {
142
+
143
+ if(param !== undefined && param.preventClose === false){
144
+
145
+ $.each( $('.'+PLUGIN_NAME) , function(index, modal) {
146
+
147
+ if( $(modal).data().iziModal !== undefined ){
148
+
149
+ var state = $(modal).iziModal('getState');
150
+
151
+
152
+
153
+ if(state == 'opened' || state == 'opening'){
154
+
155
+ $(modal).iziModal('close');
156
+
157
+ }
158
+
159
+ }
160
+
161
+ });
162
+
163
+ }
164
+
165
+ } catch(e) { /*console.warn(exc);*/ }
166
+
167
+
168
+
169
+ (function urlHash(){
170
+
171
+ if(that.options.history){
172
+
173
+
174
+
175
+ var oldTitle = document.title;
176
+
177
+ document.title = oldTitle + " - " + that.options.title;
178
+
179
+ changeHashWithoutScrolling('#'+that.id);
180
+
181
+ document.title = oldTitle;
182
+
183
+ //history.pushState({}, that.options.title, "#"+that.id);
184
+
185
+
186
+
187
+ window.$iziModal.history = true;
188
+
189
+ } else {
190
+
191
+ window.$iziModal.history = false;
192
+
193
+ }
194
+
195
+ })();
196
+
197
+
198
+
199
+ function opened(){
200
+
201
+
202
+
203
+ // console.info('[ '+PLUGIN_NAME+' | '+that.id+' ] Opened.');
204
+
205
+
206
+
207
+ that.state = STATES.OPENED;
208
+
209
+ that.$element.trigger(STATES.OPENED);
210
+
211
+
212
+
213
+ if (that.options.onOpened && ( typeof(that.options.onOpened) === "function" || typeof(that.options.onOpened) === "object" ) ) {
214
+
215
+ that.options.onOpened(that);
216
+
217
+ }
218
+
219
+ }
220
+
221
+
222
+
223
+ function bindEvents(){
224
+
225
+
226
+
227
+ // Close when button pressed
228
+
229
+ that.$element.off('click', '[data-'+PLUGIN_NAME+'-close]').on('click', '[data-'+PLUGIN_NAME+'-close]', function (e) {
230
+
231
+ e.preventDefault();
232
+
233
+
234
+
235
+ var transition = $(e.currentTarget).attr('data-'+PLUGIN_NAME+'-transitionOut');
236
+
237
+
238
+
239
+ if(transition !== undefined){
240
+
241
+ that.close({transition:transition});
242
+
243
+ } else {
244
+
245
+ that.close();
246
+
247
+ }
248
+
249
+ });
250
+
251
+
252
+
253
+ // Expand when button pressed
254
+
255
+ that.$element.off('click', '[data-'+PLUGIN_NAME+'-fullscreen]').on('click', '[data-'+PLUGIN_NAME+'-fullscreen]', function (e) {
256
+
257
+ e.preventDefault();
258
+
259
+ if(that.isFullscreen === true){
260
+
261
+ that.isFullscreen = false;
262
+
263
+ that.$element.removeClass('isFullscreen');
264
+
265
+ } else {
266
+
267
+ that.isFullscreen = true;
268
+
269
+ that.$element.addClass('isFullscreen');
270
+
271
+ }
272
+
273
+ if (that.options.onFullscreen && typeof(that.options.onFullscreen) === "function") {
274
+
275
+ that.options.onFullscreen(that);
276
+
277
+ }
278
+
279
+ that.$element.trigger('fullscreen', that);
280
+
281
+ });
282
+
283
+
284
+
285
+ // Next modal
286
+
287
+ that.$navigate.off('click', '.'+PLUGIN_NAME+'-navigate-next').on('click', '.'+PLUGIN_NAME+'-navigate-next', function (e) {
288
+
289
+ that.next(e);
290
+
291
+ });
292
+
293
+ that.$element.off('click', '[data-'+PLUGIN_NAME+'-next]').on('click', '[data-'+PLUGIN_NAME+'-next]', function (e) {
294
+
295
+ that.next(e);
296
+
297
+ });
298
+
299
+
300
+
301
+ // Previous modal
302
+
303
+ that.$navigate.off('click', '.'+PLUGIN_NAME+'-navigate-prev').on('click', '.'+PLUGIN_NAME+'-navigate-prev', function (e) {
304
+
305
+ that.prev(e);
306
+
307
+ });
308
+
309
+ that.$element.off('click', '[data-'+PLUGIN_NAME+'-prev]').on('click', '[data-'+PLUGIN_NAME+'-prev]', function (e) {
310
+
311
+ that.prev(e);
312
+
313
+ });
314
+
315
+ }
316
+
317
+ ```

2

誤字

2019/02/25 08:42

投稿

hrsw
hrsw

スコア13

test CHANGED
File without changes
test CHANGED
@@ -1,6 +1,6 @@
1
1
  jQueryのプラグイン[izimodal](http://izimodal.marcelodolce.com/)を使って、複数の内容をグループ化し、表示させるページを制作したいと考えています。
2
2
 
3
- [izimodal]は通常通り動きましたが、
3
+ izimodalは通常通り動きましたが、
4
4
 
5
5
 
6
6
 

1

補足情報(公式配布サイト、#modal-default)

2019/02/24 15:40

投稿

hrsw
hrsw

スコア13

test CHANGED
File without changes
test CHANGED
@@ -1,6 +1,6 @@
1
- jQueryのプラグインizimodalを使って、複数の内容をグループ化し、表示させるページを制作したいと考えています。
1
+ jQueryのプラグイン[izimodal](http://izimodal.marcelodolce.com/)を使って、複数の内容をグループ化し、表示させるページを制作したいと考えています。
2
2
 
3
- izimodalは通常通り動きましたが、
3
+ [izimodal]は通常通り動きましたが、
4
4
 
5
5
 
6
6
 
@@ -32,7 +32,7 @@
32
32
 
33
33
        </li>
34
34
 
35
-       <div class="iziModal" data-izimodal-title="title" data-izimodal-subtitle="subtitle">
35
+       <div id="modal-default" class="iziModal" data-izimodal-title="title" data-izimodal-subtitle="subtitle">
36
36
 
37
37
       <figure style="text-align:center;"><img class="iziModal_img" src="images/banner1_o.jpg" alt="banner1" /></figure>
38
38
 
@@ -46,7 +46,7 @@
46
46
 
47
47
     </li>
48
48
 
49
-    <div class="iziModal" data-izimodal-title="title" data-izimodal-subtitle="subtitle">
49
+    <div id="modal-default" class="iziModal" data-izimodal-title="title" data-izimodal-subtitle="subtitle">
50
50
 
51
51
     <figure style="text-align:center;"><img class="iziModal_img" src="images/banner2_o.png" alt="banner2" /></figure>
52
52