Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
This great - except I can't figure out what selector to use to place the preview right below the textarea. I tried to put it right after #edit-comment but it won't display. I suspect it has to be higher in the DOM, like level with the .form-item. Help.
move preview right below comment textarea and above filter
» Use full jquery expression instead of just selector
I found a solution after extreme trial and error. This would have been easier if I could enter a full jquery expression instead of only using selectors. Anyway, I am using form#comment-form > div div.form-item:eq(2)
So, please prepend/append/etc. selector and expect user to enter the whole jquery like
Honestly, I'm not sure how I would execute the settings string in javascript. And I have found it ideal to use selectors.. though they demand time sometimes. We might put a couple of useful ones in readme file.
Comments
Comment #1
Gurpartap Singh commentedYou can now manually set the place for the box in settings:
- CSS/jQuery selector
... and ...
- Append
- Prepend
- Replace
Comment #2
moshe weitzman commentedThis great - except I can't figure out what selector to use to place the preview right below the textarea. I tried to put it right after #edit-comment but it won't display. I suspect it has to be higher in the DOM, like level with the .form-item. Help.
Comment #3
moshe weitzman commentedAnyone?
Comment #4
moshe weitzman commentedI found a solution after extreme trial and error. This would have been easier if I could enter a full jquery expression instead of only using selectors. Anyway, I am using
form#comment-form > div div.form-item:eq(2)So, please prepend/append/etc. selector and expect user to enter the whole jquery like
$("textarea#edit-comment.parent().parent()").appendTo(box)Comment #5
Gurpartap Singh commentedHonestly, I'm not sure how I would execute the settings string in javascript. And I have found it ideal to use selectors.. though they demand time sometimes. We might put a couple of useful ones in readme file.