Alex Rivera | Logout

What is the equivalent of document.createTextNode(' ') in jQuery

Asked 2010-08-05T06:53:27.900
36

What can I use in jquery instead of document.createTextNode(' ') js line.

I'm trying to do sth like this :

js : divButtons.appendChild(document.createTextNode(' '));

jquery : $("#divButtons").append(?????);

Edit
Report

1 Answer

10
var jqTextNode = $(document.createTextNode(' '));

creates the jquery representation of a text node. i don't think there is a shortcut which works reliable.

answered 2012-10-22T15:35:02.227

Your Answer