Forum Moderators: not2easy
Is there some magic sauce that I am missing, which would enable a CSS effect for a page on the server but not locally? I know my way around HTML and CSS, and though I am not an expert I can usually figure out how something works. But not in this case.
Thanks in advance.
Edit: you need to log in to see the textarea. Here is the narrowed-down form:
<form action="/comment/reply/3618" accept-charset="UTF-8" method="post" id="comment-form">
<div>
<div class="form-item" id="edit-comment-wrapper">
<label for="edit-comment">Comment: <span class="form-required" title="This field is required.">*</span></label>
<textarea cols="60" rows="15" name="comment" id="edit-comment" class="form-textarea resizable required"></textarea>
</div>
</div></form>
I can see in the CSS where the 'grippie' is added, so that much isn't JS. But they are using jquery, which would indicate advanced JS usage and in fact there is quite a bit of JS on the page.
I think that kdedevelopers.org is drupal, and this looks to be a drupal feature.
This code seems to be the guilt party, but I cannot get it working locally on a single page:
[/code]
Drupal.textareaAttach = function() {
$('textarea.resizable:not(.processed)').each(function() {
var textarea = $(this).addClass('processed'), staticOffset = null;
$(this).wrap('<div class="resizable-textarea"></div>')
.parent().append($('<div class="grippie"></div>').mousedown(startDrag));
var grippie = $('div.grippie', $(this).parent())[0];
grippie.style.marginRight = (grippie.offsetWidth - $(this)[0].offsetWidth) +'px';
function startDrag(e) {
staticOffset = textarea.height() - Drupal.mousePosition(e).y;
textarea.css('opacity', 0.25);
$(document).mousemove(performDrag).mouseup(endDrag);
return false;
}
function performDrag(e) {
textarea.height(Math.max(32, staticOffset + Drupal.mousePosition(e).y) + 'px');
return false;
}
function endDrag(e) {
$(document).unmousemove(performDrag).unmouseup(endDrag);
textarea.css('opacity', 1);
}
});
}
if (Drupal.jsEnabled) {
$(document).ready(Drupal.textareaAttach);
}
[/code]
I also had a hard time signing up, until I went and read the original confirmation mail a second time :) You need to email a confirmation mail to the address listed in the email (not the reply address, mind you). Also, it assumes that your favorite desktop is kde :) (you will see what I mean when you read that mail carefully)
I also had a hard time signing up, until I went and read the original confirmation mail a second time :) You need to email a confirmation mail to the address listed in the email (not the reply address, mind you). Also, it assumes that your favorite desktop is kde :) (you will see what I mean when you read that mail carefully)
No - I noticed that. Although - perhaps I should put kde.org rather than the whole 'kdedevelopers.org'... But w/e.
Anywho, while I can understand what's going on in the code - I rarely use Javascript itself. I don't like it because you tend to have to write everything 2x :/. You should take what you know now and open up a thread in the Javascript Section of the website. There are more knowledgeable people there who can better assist you in making your own version of this feature.
Ryan