|
how to get dynamic attri('id') before displaying on content
|
|
23rd August, 15:48
Post: #1
|
|||
|
|||
|
how to get dynamic attri('id') before displaying on content
Hello ,
I am trying to get attri('id') before displaying on qtip content My html code JS Code
My qtip code JS Code
that will always say no. Is there any way to do this. Please advice how to do that. Many thanks, david |
|||
|
23rd August, 16:33
Post: #2
|
|||
|
|||
|
RE: how to get dynamic attri('id') before displaying on content
Uh... I'm not entirely sure what it is you're doing here to be honest... can you explain what this is supposed to do? You realise PHP code is only evaluated once for the entire page when it's rendered right?
Craig Thompson Web Developer / Designer Craigsworks http://www.craigsworks.com |
|||
|
23rd August, 17:32
Post: #3
|
|||
|
|||
RE: how to get dynamic attri('id') before displaying on content
(23rd August 16:33)Craig Wrote: Uh... I'm not entirely sure what it is you're doing here to be honest... can you explain what this is supposed to do? You realise PHP code is only evaluated once for the entire page when it's rendered right? Hello , thanks for your reply , what i am trying to do is in my html code JS Code
i got id id="1_1_0" , id="1_1_1" ,..... , these are $(this).attr('id') in my php array >>> $array = array('1_1_0' => "something 1" , "1_1_1" => "something 2"); .....etc then i display tooltip content this value content: <?php echo $array['$(this).attr(\'id\')']; ?> , so that i can get "something 1" , "something 2" ... etc on tooltip i don't know how to pass this value there is one in the forum http://craigsworks.com/projects/forums/t...ript-array var timetabledEvents = new Array(["1","01/04/2009 10�00","01/04/2009 .......); ....etc but i don't want to print large amount of data like that on html output Pleae advice is there any way to do that. Many thanks, david |
|||
|
23rd August, 18:04
Post: #4
|
|||
|
|||
|
RE: how to get dynamic attri('id') before displaying on content
Unfortunately you can't do that. PHP is evaluated once to render the page, so your method won't work. Why don't you just stick the contents in the id attribute instead of the identifier? Or if it's HTML stick it in an element directly beneath the element in the DOM and use the .next() selector to grab it?
Craig Thompson Web Developer / Designer Craigsworks http://www.craigsworks.com |
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)

Search
Member List
Calendar
Help




