Jul 202009
 

Here’s a jQuery function to make your images slightly opaque (or “disabled” looking), then have them fade in when you rollover them.

Just class your <img> tags with imgfade, like this:

<img src=”someimage.jpg” class=”imgfade”>

And put this in <head> declaration:

<script language=”javascript”>
$(document).ready(function(){
$(“.imgfade”).fadeTo(1, 0.55);
$(“.imgfade”).mouseover(function(){
$(this).fadeTo(“500”, 1);
}).mouseout(function(){
$(this).fadeTo(“500”, 0.55);
});
});
</script>
Jul 072009
 

The relative url root is the thing that is appended to the front of your path, but after the domain name, that typically is the unique name of your application. This is often used when you’re running more than one app on the same domain.

http://www.somedomain.com/BlogApp
http://www.somedomain.com/EcommerceApp

Rails.configuration.action_controller[:relative_url_root]
 Posted by at 4:57 pm  Tagged with: