Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
| js:clicktoedit [2023/01/15 17:58] – avillepreux | js:clicktoedit [2023/01/15 18:19] (Version actuelle) – avillepreux | ||
|---|---|---|---|
| Ligne 4: | Ligne 4: | ||
| jQuery(document).ready(function() | jQuery(document).ready(function() | ||
| { | { | ||
| - | // CTRL+ALT+Clic pour éditer le texte a l' | + | // CTRL+ALT+Clic pour éditer le texte a l' |
| if (typeof(click_to_edit) === ' | if (typeof(click_to_edit) === ' | ||
| Ligne 22: | Ligne 22: | ||
| jQuery(' | jQuery(' | ||
| { | { | ||
| - | | + | |
| if (evt.ctrlKey / | if (evt.ctrlKey / | ||
| { | { | ||
| - | console.log(evt.detail); | + | |
| | | ||
| // find string | // find string | ||
| Ligne 52: | Ligne 52: | ||
| // find the closest anchor link to the element double clicked (upwards) | // find the closest anchor link to the element double clicked (upwards) | ||
| | | ||
| - | var a = jQuery(this).prevAll(' | + | var a = jQuery(this).prevAll(' |
| - | | + | |
| console.log(" | console.log(" | ||
| + | | ||
| + | var b = a.prevAll(' | ||
| + | console.log(" | ||
| + | | ||
| + | var c = a.prevAll(' | ||
| + | console.log(" | ||
| | | ||
| + | var d = a.prevAll(' | ||
| + | console.log(" | ||
| + | | ||
| // find the closest edit button form to the element double clicked (downwards) and submit the form | // find the closest edit button form to the element double clicked (downwards) and submit the form | ||
| | | ||
| - | var e = jQuery(this).nextAll(' | + | var e = jQuery(this).nextAll(' |
| - | | + | |
| console.log(" | console.log(" | ||
| | | ||