Just add this code:
$(".topImage").css('width', '50%');
Look here http://jsfiddle.net/sbxmal/4fZWA/
Question
I'm making a before and after image slider like on this page:
http://upstairsweb.com/Examples/slide-bar-example.html
But I would like to have the slider already halfway the image when you visit the page. How can I accomplish this? What code do I need to add? I don't have a lot of work experience with JavaScript so hopefully someone can help me with this.
Here is the tutorial I'm following:
http://upstairsweb.com/blog/basic-jquery-beforeafter-photo-slide-bar
Solution