- This topic is empty.
March 30, 2013 at 2:57 pm #43792
P.S. Sorry for dumb questions :D.March 30, 2013 at 4:20 pm #130232hotpinkMember
The main problem is that the variable: sText is defined outside the “scope” of where you are calling it.
When you define a variable inside of a function, it is available only within that function.
Here is a fork of your codepen that demonstrates the concept
If you don’t understand the code changes I’ve made, ask more questions :)
## Codepen tips
Here is a simplified version of your code that takes advantage of Codepen features.
You can see that the
jQuery can be included by clicking the gear image on the top right of the JS box.March 30, 2013 at 4:29 pm #130233theacefesMemberMarch 30, 2013 at 5:31 pm #130234
Thanks for clearly answer. :) But I have one more question.
It’s imposible from the JS code print in to the html code? I mean in the html code shows how it looks all code with (JS + HTML, these things **slidebox.wrap(“
I wrote more there thins in JS. http://codepen.io/anon/pen/GdKcfApril 1, 2013 at 4:35 am #130308
Possible to do it?April 1, 2013 at 5:25 am #130310CrocoDillonParticipant
Not sure if I understand the question but you can add elements with JS, for example:
See http://api.jquery.com/category/manipulation/ for more jQuery DOM manipulation functions.AuthorPostsViewing 6 posts - 1 through 6 (of 6 total)