JQuery: Hiding/Showing div

Forum to discuss ExtJS and other JS plugins

JQuery: Hiding/Showing div

Postby rasmusbang » Tue Feb 02, 2010 11:54 am

Hello,

I am having some trouble using jquery for my symfony 1.4 project. I have a table showing rows of data. For each row I want to have a link or jpeg which on click will fill some data in a div.

This I have achieved by using the following call (I use the sfJQueryReloadedPlugin):

<?php echo jq_link_to_remote("(read)", array(
'update' => 'oldpick' . $pick->id,
'url' => 'expert/getOldPick',
'with' => '{ id: "'. $pick->id .'" }'
))?>

My problem is, however: How do I hide this again? I would like the "(read)" link to be removed on click, and the a new "(hide)" link to appear. Alternatively I could have two link_to_remote which are hidden/showed interchangibly?

But, in all, my question is: How can I do this? Is it possible to fire more javascript code than that created for the onclick by the symfony framework?

Best regards,
Rasmus
rasmusbang
Junior Member
 
Posts: 20
Joined: Wed Sep 09, 2009 1:04 pm

Re: JQuery: Hiding/Showing div

Postby rasmusbang » Wed Feb 03, 2010 12:36 pm

Still no luck in solving this.

Is there anyone with experience in Ajaxifying symfony projects? Someone must have tried to make a toggle function which shows/hides some content?

Any help would be fantastic!

-Rasmus
rasmusbang
Junior Member
 
Posts: 20
Joined: Wed Sep 09, 2009 1:04 pm

Re: JQuery: Hiding/Showing div

Postby aznatam » Sun Feb 14, 2010 10:03 pm

have you resolved this problem. I want if you click once you see the data if you click a second time hide it. it doesn't need to change the name.
aznatam
Junior Member
 
Posts: 16
Joined: Mon Sep 22, 2008 6:16 am
Location: Chile

Re: JQuery: Hiding/Showing div

Postby halfer » Mon Feb 15, 2010 4:04 pm

@rasmusbang - I use jQuery but haven't tried the helpers. I just load jQuery directly and do everything "raw".
halfer
Faithful Member
 
Posts: 10148
Joined: Mon Jan 30, 2006 1:16 pm
Location: West Midlands, UK


Return to Javascript plugins

Who is online

Users browsing this forum: No registered users and 0 guests

cron