You are here: Re: Wordpress Javascript Index Loop « HTML « IT news, forums, messages
Re: Wordpress Javascript Index Loop

Posted by ovation on 09/06/07 12:12

On Sep 6, 4:08 am, ovation <i...@ovationfinancial.com> wrote:
> I want to use javascript to display the categories that the post is
> filed under when a icon/image is clicked. The list of categories
> should expand at the bottom of the post under the icon(s).
>
> This works great on the single post page, but the index (main) page
> lists 10 posts, and it will only work on the first post. No matter
> what post icon is clicked the first post expands. I think I
> understand the logic behind this, but is there any way around it?
>
> Here is the code:
>
> `<a href="javascript:Effect.Combo('file', {duration: 0.5});"
> title="Filed Under"><img src="<?php echo bloginfo('template_url'); ?>/
> images/file.gif" /></a>
>
> <div id="file" style="display: none;">
> <?php echo ''; _e(get_the_category_list(', ')) ?></div>`


Thanks to "Kjell Bublitz" I have a solution. Here it is if anyone
needs it:

<a href="javascript:Effect.Combo('file<?php the_ID(); ?>',
{duration: 0.5});" title="Filed Under"><img src="<?php echo
bloginfo('template_url'); ?>/images/file.gif" /></a>

<div id="file<?php the_ID(); ?>" style="display: none;">
<?php echo ''; _e(get_the_category_list(', ')) ?></div>

Thanks to everyone.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация