Add wrap figures
This commit is contained in:
1 parent
0c43e074e3
commit
f3c73d38b0
10 files changed
+447
-170
No files matched your search
@@ -62,6 +62,19 @@ docReady(function() {
|
||||
}
|
||||
});
|
||||
|
||||
// Wrap Images and Tables
|
||||
docReady(function() {
|
||||
let wrap_elements = document.querySelectorAll('[float=wrap-right]')
|
||||
for (let wrap_el of wrap_elements) {
|
||||
wrap_el.closest('.figure').classList.add('wrap-right')
|
||||
}
|
||||
|
||||
wrap_elements = document.querySelectorAll('[float=wrap-left]')
|
||||
for (let wrap_el of wrap_elements) {
|
||||
wrap_el.closest('.figure').classList.add('wrap-left')
|
||||
}
|
||||
});
|
||||
|
||||
// Equivalent of Jquery $.ready
|
||||
function docReady(fn) {
|
||||
// see if DOM is already available
|
||||
|
||||
Reference in new issue
Block a user