@simhub2/justflipit 3.1.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -24
- package/dist/justFlipIt-modern.js +27 -17
- package/dist/justFlipIt-vanilla.js +22 -11
- package/dist/justFlipIt.js +23 -12
- package/package.json +1 -1
- package/src/justFlipIt-combined.js +23 -12
- package/src/justFlipIt-modern.js +27 -17
- package/src/justFlipIt-vanilla.js +22 -11
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# justFlipIt
|
|
8
8
|
|
|
9
|
-
A lightweight JavaScript library for beautiful, customizable
|
|
9
|
+
A lightweight JavaScript library for beautiful, customizable flip animations on any DOM element.
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -41,27 +41,26 @@ justFlipIt(".my-card");
|
|
|
41
41
|
|
|
42
42
|
---
|
|
43
43
|
|
|
44
|
-
## 🆕 Plug & Play:
|
|
44
|
+
## 🆕 Plug & Play: Automatic adoption of classes and styles
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
**This means:**
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
Du kannst z.B. einfach
|
|
48
|
+
For example, you can simply
|
|
50
49
|
|
|
51
50
|
```js
|
|
52
51
|
justFlipIt(".daisyui-card");
|
|
53
52
|
```
|
|
54
53
|
|
|
55
|
-
|
|
54
|
+
and all colors, shadows, spacing, etc. are retained, whether you use Tailwind, daisyUI, Bootstrap or your own styles.
|
|
56
55
|
|
|
57
|
-
### **
|
|
56
|
+
### **Options**
|
|
58
57
|
|
|
59
|
-
| Option |
|
|
60
|
-
| --------------- | ---- | -------- |
|
|
61
|
-
| preserveClasses | Bool | true |
|
|
62
|
-
| preserveStyles | Bool | true |
|
|
58
|
+
| Option | Type | Standard | Description |
|
|
59
|
+
| --------------- | ---- | -------- | ------------------------------------------------------------------- |
|
|
60
|
+
| preserveClasses | Bool | true | Takes all CSS classes from the original element to the panel |
|
|
61
|
+
| preserveStyles | Bool | true | Takes over all inline styles from the original element to the panel |
|
|
63
62
|
|
|
64
|
-
**
|
|
63
|
+
**Example:**
|
|
65
64
|
|
|
66
65
|
```js
|
|
67
66
|
// Standard: Plug & Play
|
|
@@ -75,7 +74,7 @@ justFlipIt(".meine-karte", { preserveClasses: false, preserveStyles: false });
|
|
|
75
74
|
|
|
76
75
|
## 🎨 Customizing (Erweitert)
|
|
77
76
|
|
|
78
|
-
|
|
77
|
+
You can use all options from justFlipIt as usual – e.g. your own templates, flip direction, animations, targeted styles:
|
|
79
78
|
|
|
80
79
|
```js
|
|
81
80
|
justFlipIt(".meine-karte", {
|
|
@@ -101,10 +100,10 @@ justFlipIt(".meine-karte", {
|
|
|
101
100
|
});
|
|
102
101
|
```
|
|
103
102
|
|
|
104
|
-
**
|
|
103
|
+
**Tip:**
|
|
105
104
|
|
|
106
|
-
-
|
|
107
|
-
-
|
|
105
|
+
- With preserveClasses: false and preserveStyles: false you have full control and can style everything specifically via option or CSS.
|
|
106
|
+
- With the default values (true) everything remains like the original element – Plug & Play!
|
|
108
107
|
|
|
109
108
|
---
|
|
110
109
|
|
|
@@ -115,7 +114,7 @@ justFlipIt(".meine-karte", {
|
|
|
115
114
|
- 📱 **Modern & Responsive** – Works on all modern browsers and devices
|
|
116
115
|
- 🔧 **Flexible Import** – Use via script tag, npm, or ES modules
|
|
117
116
|
- 🎯 **jQuery Optional** – Works with or without jQuery
|
|
118
|
-
- 🎭 **
|
|
117
|
+
- 🎭 **Flip Animations** – Beautiful CSS3 transform-based effects
|
|
119
118
|
- ⚙️ **Simple API** – Easy configuration for duration, easing, triggers, and more
|
|
120
119
|
|
|
121
120
|
---
|
|
@@ -181,16 +180,28 @@ See the [Live Demo](https://SimHub.github.io/justFlipIt/) for all options, advan
|
|
|
181
180
|
|
|
182
181
|
## License
|
|
183
182
|
|
|
184
|
-
MIT
|
|
183
|
+
MIT © [SimHub](https://github.com/SimHub)
|
|
185
184
|
|
|
186
|
-
|
|
185
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
186
|
+
of this software and associated documentation files (the “Software”), to deal
|
|
187
|
+
in the Software without restriction, including without limitation the rights
|
|
188
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
189
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
190
|
+
furnished to do so, subject to the following conditions:
|
|
187
191
|
|
|
188
|
-
|
|
192
|
+
The above copyright notice and this permission notice shall be included in all
|
|
193
|
+
copies or substantial portions of the Software.
|
|
194
|
+
|
|
195
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
196
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
197
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
198
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
199
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
200
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
201
|
+
SOFTWARE.
|
|
189
202
|
|
|
190
203
|
---
|
|
191
204
|
|
|
192
|
-
|
|
205
|
+
**[🌟 Star this project on GitHub](https://github.com/SimHub/justFlipIt)** | **[📦 View on NPM](https://www.npmjs.com/package/@simhub2/justflipit)**
|
|
193
206
|
|
|
194
|
-
|
|
195
|
-
- The recommended CSS block above ensures robust, flicker-free, and responsive flip animations for all use cases.
|
|
196
|
-
- For questions or suggestions, feel free to open an issue or contribute!
|
|
207
|
+
---
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
*
|
|
2
|
+
* justFlipIt v3.1.1
|
|
3
3
|
* https://github.com/SimHub/justFlipIt
|
|
4
4
|
*
|
|
5
|
-
* Copyright
|
|
5
|
+
* Copyright SimHub
|
|
6
6
|
* Released under the MIT license
|
|
7
7
|
*
|
|
8
|
-
* Date:
|
|
8
|
+
* Date: 2025
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
(function (root, factory) {
|
|
@@ -20,14 +20,13 @@
|
|
|
20
20
|
"use strict";
|
|
21
21
|
|
|
22
22
|
// Feature detection
|
|
23
|
-
const supportsGrid =
|
|
24
|
-
typeof CSS !== "undefined" &&
|
|
23
|
+
const supportsGrid = typeof CSS !== "undefined" &&
|
|
25
24
|
CSS.supports &&
|
|
26
25
|
CSS.supports("display", "grid");
|
|
27
|
-
const supportsWebAnimations =
|
|
28
|
-
|
|
29
|
-
const supportsCustomProperties =
|
|
30
|
-
|
|
26
|
+
const supportsWebAnimations = typeof Element !== "undefined" &&
|
|
27
|
+
"animate" in Element.prototype;
|
|
28
|
+
const supportsCustomProperties = window.CSS && CSS.supports &&
|
|
29
|
+
CSS.supports("color", "var(--test)");
|
|
31
30
|
|
|
32
31
|
// Style generation based on browser support
|
|
33
32
|
function generateStyles() {
|
|
@@ -218,7 +217,7 @@
|
|
|
218
217
|
Duration: 400, // Animation duration in ms
|
|
219
218
|
Easing: "ease-in-out", // Animation easing function
|
|
220
219
|
preserveClasses: true, // NEU
|
|
221
|
-
preserveStyles: true
|
|
220
|
+
preserveStyles: true, // NEU
|
|
222
221
|
},
|
|
223
222
|
options,
|
|
224
223
|
);
|
|
@@ -269,17 +268,28 @@
|
|
|
269
268
|
|
|
270
269
|
// NEU: Klassen übernehmen (Panel, .front, .backY)
|
|
271
270
|
if (this.settings.preserveClasses && originalElement.classList.length) {
|
|
272
|
-
originalElement.classList.forEach(cls => {
|
|
273
|
-
if (!hoverPanel.classList.contains(cls))
|
|
274
|
-
|
|
275
|
-
|
|
271
|
+
originalElement.classList.forEach((cls) => {
|
|
272
|
+
if (!hoverPanel.classList.contains(cls)) {
|
|
273
|
+
hoverPanel.classList.add(cls);
|
|
274
|
+
}
|
|
275
|
+
if (frontWrapper && !frontWrapper.classList.contains(cls)) {
|
|
276
|
+
frontWrapper.classList.add(cls);
|
|
277
|
+
}
|
|
278
|
+
if (backWrapper && !backWrapper.classList.contains(cls)) {
|
|
279
|
+
backWrapper.classList.add(cls);
|
|
280
|
+
}
|
|
276
281
|
});
|
|
277
282
|
}
|
|
278
283
|
|
|
279
284
|
// NEU: Inline-Styles übernehmen (nur auf Panel)
|
|
280
|
-
if (
|
|
281
|
-
|
|
282
|
-
|
|
285
|
+
if (
|
|
286
|
+
this.settings.preserveStyles && originalElement.getAttribute("style")
|
|
287
|
+
) {
|
|
288
|
+
hoverPanel.setAttribute(
|
|
289
|
+
"style",
|
|
290
|
+
(hoverPanel.getAttribute("style") || "") +
|
|
291
|
+
";" + originalElement.getAttribute("style"),
|
|
292
|
+
);
|
|
283
293
|
}
|
|
284
294
|
|
|
285
295
|
// Nur den INHALT übernehmen!
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
*
|
|
2
|
+
* justFlipIt v3.1.1
|
|
3
3
|
* https://github.com/SimHub/justFlipIt
|
|
4
4
|
*
|
|
5
|
-
* Copyright
|
|
5
|
+
* Copyright SimHub
|
|
6
6
|
* Released under the MIT license
|
|
7
7
|
*
|
|
8
|
-
* Date:
|
|
8
|
+
* Date: 2025
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
(function (root, factory) {
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
Duration: 400,
|
|
164
164
|
Easing: "ease-in-out",
|
|
165
165
|
preserveClasses: true, // NEU
|
|
166
|
-
preserveStyles: true
|
|
166
|
+
preserveStyles: true, // NEU
|
|
167
167
|
},
|
|
168
168
|
options,
|
|
169
169
|
);
|
|
@@ -199,17 +199,28 @@
|
|
|
199
199
|
|
|
200
200
|
// NEU: Klassen übernehmen (Panel, .front, .backY)
|
|
201
201
|
if (this.settings.preserveClasses && originalElement.classList.length) {
|
|
202
|
-
originalElement.classList.forEach(cls => {
|
|
203
|
-
if (!hoverPanel.classList.contains(cls))
|
|
204
|
-
|
|
205
|
-
|
|
202
|
+
originalElement.classList.forEach((cls) => {
|
|
203
|
+
if (!hoverPanel.classList.contains(cls)) {
|
|
204
|
+
hoverPanel.classList.add(cls);
|
|
205
|
+
}
|
|
206
|
+
if (frontWrapper && !frontWrapper.classList.contains(cls)) {
|
|
207
|
+
frontWrapper.classList.add(cls);
|
|
208
|
+
}
|
|
209
|
+
if (backWrapper && !backWrapper.classList.contains(cls)) {
|
|
210
|
+
backWrapper.classList.add(cls);
|
|
211
|
+
}
|
|
206
212
|
});
|
|
207
213
|
}
|
|
208
214
|
|
|
209
215
|
// NEU: Inline-Styles übernehmen (nur auf Panel)
|
|
210
|
-
if (
|
|
211
|
-
|
|
212
|
-
|
|
216
|
+
if (
|
|
217
|
+
this.settings.preserveStyles && originalElement.getAttribute("style")
|
|
218
|
+
) {
|
|
219
|
+
hoverPanel.setAttribute(
|
|
220
|
+
"style",
|
|
221
|
+
(hoverPanel.getAttribute("style") || "") +
|
|
222
|
+
";" + originalElement.getAttribute("style"),
|
|
223
|
+
);
|
|
213
224
|
}
|
|
214
225
|
|
|
215
226
|
// Nur den INHALT übernehmen!
|
package/dist/justFlipIt.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
* justFlipIt v3.
|
|
1
|
+
/*5
|
|
2
|
+
* justFlipIt v3.1.1
|
|
3
3
|
* https://github.com/SimHub/justFlipIt
|
|
4
4
|
*
|
|
5
|
-
* Copyright
|
|
5
|
+
* Copyright SimHub
|
|
6
6
|
* Released under the MIT license
|
|
7
7
|
*
|
|
8
|
-
* Date:
|
|
8
|
+
* Date: 2025
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
(function (root, factory) {
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
Duration: 400,
|
|
171
171
|
Easing: "ease-in-out",
|
|
172
172
|
preserveClasses: true, // NEU
|
|
173
|
-
preserveStyles: true
|
|
173
|
+
preserveStyles: true, // NEU
|
|
174
174
|
},
|
|
175
175
|
options,
|
|
176
176
|
);
|
|
@@ -206,17 +206,28 @@
|
|
|
206
206
|
|
|
207
207
|
// NEU: Klassen übernehmen (Panel, .front, .backY)
|
|
208
208
|
if (this.settings.preserveClasses && originalElement.classList.length) {
|
|
209
|
-
originalElement.classList.forEach(cls => {
|
|
210
|
-
if (!hoverPanel.classList.contains(cls))
|
|
211
|
-
|
|
212
|
-
|
|
209
|
+
originalElement.classList.forEach((cls) => {
|
|
210
|
+
if (!hoverPanel.classList.contains(cls)) {
|
|
211
|
+
hoverPanel.classList.add(cls);
|
|
212
|
+
}
|
|
213
|
+
if (frontWrapper && !frontWrapper.classList.contains(cls)) {
|
|
214
|
+
frontWrapper.classList.add(cls);
|
|
215
|
+
}
|
|
216
|
+
if (backWrapper && !backWrapper.classList.contains(cls)) {
|
|
217
|
+
backWrapper.classList.add(cls);
|
|
218
|
+
}
|
|
213
219
|
});
|
|
214
220
|
}
|
|
215
221
|
|
|
216
222
|
// NEU: Inline-Styles übernehmen (nur auf Panel)
|
|
217
|
-
if (
|
|
218
|
-
|
|
219
|
-
|
|
223
|
+
if (
|
|
224
|
+
this.settings.preserveStyles && originalElement.getAttribute("style")
|
|
225
|
+
) {
|
|
226
|
+
hoverPanel.setAttribute(
|
|
227
|
+
"style",
|
|
228
|
+
(hoverPanel.getAttribute("style") || "") +
|
|
229
|
+
";" + originalElement.getAttribute("style"),
|
|
230
|
+
);
|
|
220
231
|
}
|
|
221
232
|
|
|
222
233
|
// Nur den INHALT übernehmen!
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simhub2/justflipit",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"description": "A lightweight JavaScript library that allows you to implement CSS3 based flip animations on any DOM elements",
|
|
5
5
|
"main": "dist/justFlipIt.js",
|
|
6
6
|
"module": "dist/justFlipIt.js",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
* justFlipIt v3.
|
|
1
|
+
/*5
|
|
2
|
+
* justFlipIt v3.1.1
|
|
3
3
|
* https://github.com/SimHub/justFlipIt
|
|
4
4
|
*
|
|
5
|
-
* Copyright
|
|
5
|
+
* Copyright SimHub
|
|
6
6
|
* Released under the MIT license
|
|
7
7
|
*
|
|
8
|
-
* Date:
|
|
8
|
+
* Date: 2025
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
(function (root, factory) {
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
Duration: 400,
|
|
171
171
|
Easing: "ease-in-out",
|
|
172
172
|
preserveClasses: true, // NEU
|
|
173
|
-
preserveStyles: true
|
|
173
|
+
preserveStyles: true, // NEU
|
|
174
174
|
},
|
|
175
175
|
options,
|
|
176
176
|
);
|
|
@@ -206,17 +206,28 @@
|
|
|
206
206
|
|
|
207
207
|
// NEU: Klassen übernehmen (Panel, .front, .backY)
|
|
208
208
|
if (this.settings.preserveClasses && originalElement.classList.length) {
|
|
209
|
-
originalElement.classList.forEach(cls => {
|
|
210
|
-
if (!hoverPanel.classList.contains(cls))
|
|
211
|
-
|
|
212
|
-
|
|
209
|
+
originalElement.classList.forEach((cls) => {
|
|
210
|
+
if (!hoverPanel.classList.contains(cls)) {
|
|
211
|
+
hoverPanel.classList.add(cls);
|
|
212
|
+
}
|
|
213
|
+
if (frontWrapper && !frontWrapper.classList.contains(cls)) {
|
|
214
|
+
frontWrapper.classList.add(cls);
|
|
215
|
+
}
|
|
216
|
+
if (backWrapper && !backWrapper.classList.contains(cls)) {
|
|
217
|
+
backWrapper.classList.add(cls);
|
|
218
|
+
}
|
|
213
219
|
});
|
|
214
220
|
}
|
|
215
221
|
|
|
216
222
|
// NEU: Inline-Styles übernehmen (nur auf Panel)
|
|
217
|
-
if (
|
|
218
|
-
|
|
219
|
-
|
|
223
|
+
if (
|
|
224
|
+
this.settings.preserveStyles && originalElement.getAttribute("style")
|
|
225
|
+
) {
|
|
226
|
+
hoverPanel.setAttribute(
|
|
227
|
+
"style",
|
|
228
|
+
(hoverPanel.getAttribute("style") || "") +
|
|
229
|
+
";" + originalElement.getAttribute("style"),
|
|
230
|
+
);
|
|
220
231
|
}
|
|
221
232
|
|
|
222
233
|
// Nur den INHALT übernehmen!
|
package/src/justFlipIt-modern.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
*
|
|
2
|
+
* justFlipIt v3.1.1
|
|
3
3
|
* https://github.com/SimHub/justFlipIt
|
|
4
4
|
*
|
|
5
|
-
* Copyright
|
|
5
|
+
* Copyright SimHub
|
|
6
6
|
* Released under the MIT license
|
|
7
7
|
*
|
|
8
|
-
* Date:
|
|
8
|
+
* Date: 2025
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
(function (root, factory) {
|
|
@@ -20,14 +20,13 @@
|
|
|
20
20
|
"use strict";
|
|
21
21
|
|
|
22
22
|
// Feature detection
|
|
23
|
-
const supportsGrid =
|
|
24
|
-
typeof CSS !== "undefined" &&
|
|
23
|
+
const supportsGrid = typeof CSS !== "undefined" &&
|
|
25
24
|
CSS.supports &&
|
|
26
25
|
CSS.supports("display", "grid");
|
|
27
|
-
const supportsWebAnimations =
|
|
28
|
-
|
|
29
|
-
const supportsCustomProperties =
|
|
30
|
-
|
|
26
|
+
const supportsWebAnimations = typeof Element !== "undefined" &&
|
|
27
|
+
"animate" in Element.prototype;
|
|
28
|
+
const supportsCustomProperties = window.CSS && CSS.supports &&
|
|
29
|
+
CSS.supports("color", "var(--test)");
|
|
31
30
|
|
|
32
31
|
// Style generation based on browser support
|
|
33
32
|
function generateStyles() {
|
|
@@ -218,7 +217,7 @@
|
|
|
218
217
|
Duration: 400, // Animation duration in ms
|
|
219
218
|
Easing: "ease-in-out", // Animation easing function
|
|
220
219
|
preserveClasses: true, // NEU
|
|
221
|
-
preserveStyles: true
|
|
220
|
+
preserveStyles: true, // NEU
|
|
222
221
|
},
|
|
223
222
|
options,
|
|
224
223
|
);
|
|
@@ -269,17 +268,28 @@
|
|
|
269
268
|
|
|
270
269
|
// NEU: Klassen übernehmen (Panel, .front, .backY)
|
|
271
270
|
if (this.settings.preserveClasses && originalElement.classList.length) {
|
|
272
|
-
originalElement.classList.forEach(cls => {
|
|
273
|
-
if (!hoverPanel.classList.contains(cls))
|
|
274
|
-
|
|
275
|
-
|
|
271
|
+
originalElement.classList.forEach((cls) => {
|
|
272
|
+
if (!hoverPanel.classList.contains(cls)) {
|
|
273
|
+
hoverPanel.classList.add(cls);
|
|
274
|
+
}
|
|
275
|
+
if (frontWrapper && !frontWrapper.classList.contains(cls)) {
|
|
276
|
+
frontWrapper.classList.add(cls);
|
|
277
|
+
}
|
|
278
|
+
if (backWrapper && !backWrapper.classList.contains(cls)) {
|
|
279
|
+
backWrapper.classList.add(cls);
|
|
280
|
+
}
|
|
276
281
|
});
|
|
277
282
|
}
|
|
278
283
|
|
|
279
284
|
// NEU: Inline-Styles übernehmen (nur auf Panel)
|
|
280
|
-
if (
|
|
281
|
-
|
|
282
|
-
|
|
285
|
+
if (
|
|
286
|
+
this.settings.preserveStyles && originalElement.getAttribute("style")
|
|
287
|
+
) {
|
|
288
|
+
hoverPanel.setAttribute(
|
|
289
|
+
"style",
|
|
290
|
+
(hoverPanel.getAttribute("style") || "") +
|
|
291
|
+
";" + originalElement.getAttribute("style"),
|
|
292
|
+
);
|
|
283
293
|
}
|
|
284
294
|
|
|
285
295
|
// Nur den INHALT übernehmen!
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
*
|
|
2
|
+
* justFlipIt v3.1.1
|
|
3
3
|
* https://github.com/SimHub/justFlipIt
|
|
4
4
|
*
|
|
5
|
-
* Copyright
|
|
5
|
+
* Copyright SimHub
|
|
6
6
|
* Released under the MIT license
|
|
7
7
|
*
|
|
8
|
-
* Date:
|
|
8
|
+
* Date: 2025
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
(function (root, factory) {
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
Duration: 400,
|
|
164
164
|
Easing: "ease-in-out",
|
|
165
165
|
preserveClasses: true, // NEU
|
|
166
|
-
preserveStyles: true
|
|
166
|
+
preserveStyles: true, // NEU
|
|
167
167
|
},
|
|
168
168
|
options,
|
|
169
169
|
);
|
|
@@ -199,17 +199,28 @@
|
|
|
199
199
|
|
|
200
200
|
// NEU: Klassen übernehmen (Panel, .front, .backY)
|
|
201
201
|
if (this.settings.preserveClasses && originalElement.classList.length) {
|
|
202
|
-
originalElement.classList.forEach(cls => {
|
|
203
|
-
if (!hoverPanel.classList.contains(cls))
|
|
204
|
-
|
|
205
|
-
|
|
202
|
+
originalElement.classList.forEach((cls) => {
|
|
203
|
+
if (!hoverPanel.classList.contains(cls)) {
|
|
204
|
+
hoverPanel.classList.add(cls);
|
|
205
|
+
}
|
|
206
|
+
if (frontWrapper && !frontWrapper.classList.contains(cls)) {
|
|
207
|
+
frontWrapper.classList.add(cls);
|
|
208
|
+
}
|
|
209
|
+
if (backWrapper && !backWrapper.classList.contains(cls)) {
|
|
210
|
+
backWrapper.classList.add(cls);
|
|
211
|
+
}
|
|
206
212
|
});
|
|
207
213
|
}
|
|
208
214
|
|
|
209
215
|
// NEU: Inline-Styles übernehmen (nur auf Panel)
|
|
210
|
-
if (
|
|
211
|
-
|
|
212
|
-
|
|
216
|
+
if (
|
|
217
|
+
this.settings.preserveStyles && originalElement.getAttribute("style")
|
|
218
|
+
) {
|
|
219
|
+
hoverPanel.setAttribute(
|
|
220
|
+
"style",
|
|
221
|
+
(hoverPanel.getAttribute("style") || "") +
|
|
222
|
+
";" + originalElement.getAttribute("style"),
|
|
223
|
+
);
|
|
213
224
|
}
|
|
214
225
|
|
|
215
226
|
// Nur den INHALT übernehmen!
|