This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » plugins » Javascript plugins » JQuery: Hiding/Showing div
JQuery: Hiding/Showing div [message #92708] Tue, 02 February 2010 10:54 Go to next message
rasmusbang  is currently offline rasmusbang
Messages: 19
Registered: September 2009
Junior Member
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
Re: JQuery: Hiding/Showing div [message #92804 is a reply to message #92708 ] Wed, 03 February 2010 11:36 Go to previous messageGo to next message
rasmusbang  is currently offline rasmusbang
Messages: 19
Registered: September 2009
Junior Member
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
Re: JQuery: Hiding/Showing div [message #93541 is a reply to message #92804 ] Sun, 14 February 2010 21:03 Go to previous messageGo to next message
aznatam  is currently offline aznatam
Messages: 15
Registered: September 2008
Location: Chile
Junior Member
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.

Re: JQuery: Hiding/Showing div [message #93585 is a reply to message #92708 ] Mon, 15 February 2010 15:04 Go to previous message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
@rasmusbang - I use jQuery but haven't tried the helpers. I just load jQuery directly and do everything "raw".


Remember Palestine
Previous Topic:dynamic jQuery remote request
Next Topic:sfFormExtraPlugin's autocompleter does not work
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software