Np. mam div'a, w którym mam zawartość np:
a chciałbym otrzymać:
Jest jakiś prosty sposób na to?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <title>Untitled Document</title> </head> <body> <script type="text/javascript"> String.prototype.reverse= function(){ var s= '', L= this.length; while(L){ s+= this[--L]; } return s; } $(document).ready(function() { $('#aaa').text( $('#aaa').text().reverse() ); }); </script> <div id="aaa">qwertyuiop</div> </body> </html>
span.odwroc { unicode-bidi:bidi-override; direction: rtl; }
$("div[id^='nazwa_']")