|
[Solved] Passing variables into content: api: data
|
|
20th August, 16:01
Post: #1
|
|||
|
|||
|
[Solved] Passing variables into content: api: data
Using v2. Assuming this question is due to only having a surface level knowledge of Javascript.
I have qtip working, and loading content via api, but I'd like to pass along a variable from out of each particular instance, in this case the value of the rel attribute would work just fine. But when I use JS Code
, nothing comes through. I suppose the $(this) is not in the right context to work? JS Code
Thanks in advance for tips/help. |
|||
|
20th August, 18:31
Post: #2
|
|||
|
|||
|
RE: Passing variables into content: api: data
Try wrapping your call in an each() method first, this sets "this" to reffer to the current element within the loop:
JS Code
Craig Thompson Web Developer / Designer Craigsworks http://www.craigsworks.com |
|||
|
20th August, 18:53
Post: #3
|
|||
|
|||
|
RE: [Solved] Passing variables into content: api: data
Woohoo! It worked. Thanks so much.
Note: Line two was missing parenthesis after "this", should be: JS Code
|
|||
|
16th September, 07:58
Post: #4
|
|||
|
|||
|
RE: [Solved] Passing variables into content: api: data
This should be a tutorial, This is very useful for creating drop menu's or pop up content (more than what could be put in a title attr)[/code].
JS Code
JS Code
It took me forever to figure out the each, and only because I found it in the forums. |
|||
|
16th September, 14:12
Post: #5
|
|||
|
|||
|
RE: [Solved] Passing variables into content: api: data
Also just a quick FYI, as of the latest commits you can also use a custom function for your content so you don't need to use an .each() loop!
JS Code
Enjoy! Craig Thompson Web Developer / Designer Craigsworks http://www.craigsworks.com |
|||
|
9th October, 15:53
Post: #6
|
|||
|
|||
|
RE: [Solved] Passing variables into content: api: data
Maybee you can help me, but in the show/hide event how do i access the id $(this).attr('id')
JS Code
|
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)

Search
Member List
Calendar
Help




