tags:

views:

26

answers:

3

Welcome,

I have some link's inside my webpage.

Is there any function in jquery / javascript what allow me to put cursor into textarea at end ?

When user click at link above textarea, i would like move cursor back where he came from.

Now he have to stop typing and click into textarea back.

Just like here, when he click for example "bold".

Now i use

$('#textarea').focus();

But it move cursor at beginning. I would like at end.

A: 

See jQuery Set Cursor Position in Text Area

Galwegian
A: 

Working code

    var temp;
    temp=$('#textarea').val();
    $('#textarea').val('');
    $('#textarea').val(temp);
marc