Javascript

Benutzerfreundlichere Textareas mit jQuery-Plugin

Wie prettyComments das Surfer-Leben erleichtert

So ziemlich jede Website besitzt in irgendeiner Art und Weise eine Möglichkeit über die der Benutzer Kontakt zum Betreiber aufnehmen kann. Sei dies über Kommentarfunktionen einzelner Blogeinträge oder ein Kontaktformular. Allen diesen Möglichkeiten gemein ist die Verwendung eines HTML-Formulars und in diesem eine Textbox (Textarea) in der der Benutzer seinen Senf eingeben kann.

Nun ist der aktuelle HTML-Standard schon uralt und ergo hat sich bezüglich der Funktionalität der Formular-Steuerelemente nichts getan. So ist es immer noch ein ziemlicher Krampf einen etwas längeren Text zum Beispiel in ein Kommentarfeld einzugeben, wenn der Webdesigner gerade mal 3 Zeilen sichtbar zur Verfügung stellt. Möchte man noch einmal nachschauen was man drei Sätze weiter oben geschrieben hat, fängt man an zu scrollen.

Der Safari-Browser "pimpt" diese Textareas zumindest so, dass der Benutzer sie sich etwas größer ziehen kann, aber befriedigend ist das nicht, zumal die meisten wohl mit dem IE oder Firefox unterwegs sind.

Der Kanadier Stéphane Caron hat sich des Themas auf eine sehr pfiffige und einfache Weise angenommen. Er hat auf Basis des Javascript-Frameworks jQuery das Plugin prettyComments entwickelt, dass, vom Webentwickler in die Seite eingebunden, automatisch die Höhe einer solchen Textbox um eine Zeile erweitert, sobald der Benutzer in der letzten Zeile angelangt ist.

Der ganze Zauber ist derart einfach in die eigenen Seiten einzubauen, dass es schon fast an Fahrlässigkeit grenzt, wenn man es als Webmaster nicht tut.

<!-- Einbinden des jQuery-Plugins -->
<script src="js/prettyComments.js" type="text/javascript"></script>

...

<!-- Aufruf der Methode 'prettyComments' für alle Textareas der Seite -->
<script type="text/javascript">
    $(document).ready(function() {
        $("textarea").prettyComments({ animate: true });
    });
</script>

Wer das Ding in Aktion sehen möchte, muss auf dieser Seite nur ein klein wenig nach unten zu den Kommentaren scrollen.

Happy Coding :)

kick it on dotnet-kicks.de AddThis Trackback-Url...

Schlagworte

109 Kommentare bislang...

  • As we all know, Nike remains the King of basketball footwear. There is a good purpose why they are the basketball shoe juggernaut in the world-wide marketplace. The <a href="http://www.freenikeschuhe.de/">Nike Free</a> Schuhe will make its way into the fall season with a limited tier zero release. The Nike Free Run is constructed in a mixture of woven and leather materials. Three tonal colorways will be available in blue, grey, and black. This Nike Free Run Günstig is scheduled to drop sometime next month. Make sure to hit up your local Nike tier zero accounts for availability.

    The top complete utilizes a no-sew technology nike Free run all-overs Nanoply. This removes the seams while in the upper, abolishment anyone with no accumulated movement with the foot, which can be aided by the stretchy and materials. The <a href="http://www.freenikeschuhe.de/">Nike Free Run</a> appropriately should be apprenticed to admonition accrue the basal added the sole axial abutting phone, and this bootie-like in able ability favoured those of our testers with narrower toes. But it had been just aswell apprenticed adventurous for our broader-footed antic men, creating a new hot atom about the top midfoot connected argot spot.

    These running shoes were created to meet the needs of the minimalist runner. They will help you feel more in touch with the ground, yet still manage to provide enough protection to keep your feet safe from the dangers of running barefoot. Since these shoes tend to work out different muscle groups than normal when running, it’s suggested that you ease into them, running short distances until your muscles get used to the new style of Nike Free Run Switzerland.

    The <a href="http://www.freenikeschuhe.de/">Nike Free 3.0</a> retailer houses amazing collection ofs andals for girls. These types of can be present in a lot of shops too as shops marketing this at wholesale rates and even list. Prior to deciding to help make the last selection, examine quite a few customer testimonies. In situation you are not necessarily enthusiastic inside sporting the specific buckskin sort, won’t take action. They may industry the full distinct breathtaking as well as high-class further more nike free run 2 dimensions corset, nighties, golf club use and also halloween costume forms.
    109
    Nike Free : Montag, 20. Mai 2013 11:06
  • 108
    armstrong security : Sonntag, 12. Mai 2013 13:02
  • When you look forward to buy the clip in wavy hair extensions offline or online, it is better clip in wavy hair extensions to go through the terms and conditions clip in real hair extensions of the store for return and exchange clip in real hair extensions. If the clip in human hair extensions is found not to be of same quality clip in human hair extensions as promised, you can always get your money refunded and ask for better quality clip in human hair extensions.
    107
    myjz2012 : Dienstag, 30. April 2013 13:40
  • whence the appellation of visionaries to those who are thus affected. Every nation, and every celebrated man <a href="http://www.fitflopsg-singapore.com/"><strong>fitflops</strong></a> Spirits haunted castles and cemeteries; there was no one but had seen an apparition http://www.fitflopsg-singapore.com/ fitflop singapore At the present time, the north of Europe, and some of our provinces, manifest a belief in visions <a href="http://www.fitflopsg-singapore.com/"><strong>fitflop outlet</strong></a> then for a long period rejected as fabulous, and now again receive their just appreciation.
    106
    fitflops Spirits haunted castles and cemeteries; there was no one but had seen ">fitflop outlet : Freitag, 26. April 2013 03:36
  • Jimmy Choo2013 spring and summer series launched a amazing material: printing python skin. Jimmy Choo Shoes The dynamic design is the exclusive design of Jimmy Choo Pumps , concentrated the 60 s and 70 s senior gypsy style inspiration. The colorful bright flower design with printing on the natural python skin, Jimmy Choo Sandals retained the distinctive snake logo, increased the tactile texture at the same time make each product is unique. Christian Louboutin Pumps Sale French luxury brand Christian Louboutin shoes after earlier release Freddy Man Flat shoes, the brand trademark rivet back again to add a subject pure black Rollerboat Flat shoes with Flat sole. Christian Louboutin On Sale Price $1095 (about $8502 Hong Kong dollars), Christian Louboutins USA to expensive price, or would you let a lot of people off.
    105
    printing : Freitag, 19. April 2013 10:52

Dein Kommentar hierzu...


Kommentar-Feed für diesen Beitrag
Gravatare werden unterstützt .:. eMail-Adressen werden nicht veröffentlicht
 

RSS-Feed

Die URL des Standard-Newsfeed von zerbit.de lautet:

http://www.zerbit.de/rssfeed.aspx

Login


 

 

Statistik



kürzlich kommentiert

Beitrag 274

  • Datum: 20.12.2008
    Kategorie: Javascript
    Zugriffe: 9.905
    Kommentare: 109
    Trackbacks: 0

Letzte Beiträge

Kategorien

Buttons & More

Blog-Roll

Banner Piraten-Partei