Another funny issue I ran into: apparently jquery can not find elements by ID (#) if the ID string starts with a hashtag (#). In my case, I was using IDs generated from twitter hashtags, and as you know hashtags start with #
So, using $(‘p##myhashtag’).html() did not work. What I could do, is to change the ID of the element and remove the # from the ID. But how do you do it with jade?
- var st = hashtag - var len = st.length - var myst = st.substr(1,len) p(id=myst)