search for: togglediv

Displaying 2 results from an estimated 2 matches for "togglediv".

Did you mean: toggled
2007 Apr 21
0
Collapsible Hide/Show DIV
...osted this before but wanted to change the subject. I want to have a collapsible div inside of a for loop. I''ve been messing around with it and could only get 1 item out of a few to be able to hide. I''m just using this: <script language="javascript"> function toggleDiv(divid){ if(document.getElementById(divid).style.display == ''none''){ document.getElementById(divid).style.display = ''block''; }else{ document.getElementById(divid).style.display = ''none''; } } </script> Now, I have...
2008 Jul 21
0
Re: Listing user jobs
...per.rb: def userjobs userid = current_user.id @jobs = Job.find(:all, :conditions => { :user_id => userid }) return(@jobs) end In application.rb: helper :application In qalayout.html.erb: <% if logged_in? %> <a href="javascript:;" onmousedown="toggleDiv(''viewjobs'');">View your jobs</a> <div id="viewjobs" style="display:none"> <% @jobs = userjobs() %> <% for job in @jobs %> <%=h job.status %> <%=h job.filename %> <%=h job.created_at %> <%=h job....