-
Notifications
You must be signed in to change notification settings - Fork 13
/
image block image caption second add.html
80 lines (45 loc) · 1.99 KB
/
image block image caption second add.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<script>
$( ( ) => {
/*
begin image block image caption second add
License : < https://tinyurl.com/s872fb68 >
Version : 0.2.0
SS Versions : 7.1, 7.0
v7.1
Fluid
Engine
Compatible : No
v7.0 Templates : Brine ( Aria, Blend, Burke, Cacao, Clay, Fairfield, Feed,
Foster, Greenwich, Hatch, Heights, Hunter, Hyde, Impact,
Jaunt, Juke, Keene, Kin, Lincoln, Maple, Margot, Marta,
Mentor, Mercer, Miller, Mojave, Moksha, Motto, Nueva, Pedro,
Pursuit, Rally, Rover, Royce, Sofia, Sonora, Stella, Thorne,
Vow, Wav, West )
your template is not listed? then it is not currently
supported
Dependencies : jQuery
By : Thomas Creedon < http://www.tomsWeb.consulting/ >
no user serviceable parts below
*/
const selector =
':not( .fe-block ) > .sqs-block-image .image-block-outer-wrapper';
$( selector ).each ( function ( ) {
const $this = $( this );
const isInline = $this.is ( '.design-layout-inline' );
const caption = $( 'img', $this )
.attr ( 'alt' );
const $div = $( '<div>' )
.addClass ( 'twc-ibicsa-caption-second' )
.text ( caption );
const targetSelector = isInline ?
/* card, collage, overlap, poster, stack */
'.image-block-wrapper'
:
/* inline */
'.image-inset';
$( targetSelector, $this )
.append ( $div );
} );
// end image block image caption second add
} );
</script>