Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 453623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T22:11:26+00:00 2026-05-12T22:11:26+00:00

Hello i need to highlight a div after my page is loading, i don’t

  • 0

Hello i need to highlight a div after my page is loading, i don’t know if i should use a partial or something like that, the partial also has to have 2 variables disponible.

Code to highlight after loading by 5 seconds:

<div id="total_de_venta">
<% if @instalador.a_destajo? %>
<div align="right"><b>Total de la venta: $<%= @venta.precio_de_venta + @venta.precio_de_instalacion*2 %></b></div>

<% else %>
<div align="right"><b>Total de la venta: $<%= @venta.precio_de_venta + @venta.precio_de_instalacion*2 %></b></div>
<% end %>
</div>

controller :

def show


  @venta = Venta.find(params[:id])

  @este_instalador_id = @venta.instalador_id



  @instalador = Instalador.find_by_id(@este_instalador_id)


  #visual_effect(:highlight, "total_zone", :duration => 3.0)

  respond_to do |format|
    format.html # show.html.erb
    format.xml  { render :xml => @project }
  end
end
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T22:11:26+00:00Added an answer on May 12, 2026 at 10:11 pm

    Can’t you just do it by some Javascript only construction? I’m not a ruby programmer, but I’m sure you can add a ‘onLoad’ event to your page. The ‘onLoad’ event fires after the page is loaded. In the ‘onLoad’ handler you can add your desired effect, e.g. :

    Effect.Highlight($('id_of_element'), [ your options]);
    

    To add more than one ‘onLoad’ handler and execute them all, you can use the following Prototype function:

    Event.observe(window, 'load', yourJavascriptFunction);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello I need to do something like this: UPDATE tbl SET pozn=CONCAT(pozn, '+attach_str+') WHERE
Hello I need to make a chart like this : http://www.xe.com/currencycharts/?from=USD}&to=EUR Should I use
Hello i need to use writerreaderlock in my method. I want to know how
Hello I need to set scroll view in following code,and set after first relative
Hello i' need to use a pop-up menu, witch is created dynamically. OSErr err
Hello i need to know there my flash application is running. in object src
Hello i need to gater the data from db(MSSQL) in following way: <div id=slider>
Hello I need to know if there is a way to find out what
Hello I need to know how to check if the object of the same
hello guys i need to use pure SQL queries for my database project at

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.