jquery dialog with dynamic data
Hello,
First I want to thank everyone who has helped me in previous posts (kbwood and jakecigar to name a few). I'm not sure if my question is more php than jquery but it can't hurt to ask.
I"ve had success calling a jquery dialog with a hyperlink using href="#". Where I"m running into problems, is linking to multiple dialogs on one page. I'm hoping to call the dialog with an href="#{contentVariable}"
I"m using ExpressionEngine CMS, so once in the dialog I can call the correct data. I"m just having problems with the link to the dialog.
I thought the code below may be the code to use but I'm stumped with what and were to add the code. I inserted [I think I need code here] where I think I should add code. Am I on the right track? Or should I call a separate page?
Thanks in advance if anyone can point me in the right direction.
Peter T
- $('a').click(function() {
- var name = $(this).attr('href').[I think I need code here];
- $('#dialog').dialog('open');
- return false;
- });
the link to call the dialog
- <a href="/pt/emb/{contentVariable}" title="{title}" id="dialog"><img src="{pt_sample_thumb}" alt="{title}" width="170" height="170" border="0" /></a>
Once in the dialog
- <div id="content">
- {exp:channel:entries channel="myinfo" url_title="{contentVariable}" disable="member_data|categories"}
- <p><img src="{sample_file}" alt="{title}" width="640" height="480" border="0" /></p>
- {/exp:channel:entries}
- </div>