rubyonrailsin

A Ruby and Rails talk

Wednesday, March 10, 2010


[Rails] Re: How to hide an object???

by rubyonrailsin 0 comments



Share this post:
Design Float
StumbleUpon
Reddit

Hi:
Sometimes I feel that I am so stupid. I put in my view the following:

<script type="text/javascript">

function lastSpy() {

var target = $('imagen');

if (!target) return false;
new Ajax.PeriodicalUpdater(target,
'http://localhost:3000/',{frequency:'1'})
}

Event.observe(window, 'load', lastSpy, false);
</script>
<div id="imagen">
<%=image_tag("/guarrada/Debug/foto.jpg") %>
</div>

$(document).ready(function() {
$('#imagen').hide();
});


and in the layout carpet inthe home.html.erb I added
<%= javascript_include_tag 'jquery'%>

What´s exactly wrong??

Thanks for your time


--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive