Rollover image (toggle) causes page shift

I have an issue that I cannot figure out how to resolve.

I have a toggle on my site that I use to flip between different versions of similar products.
There are many. visit sbravo daht com and navigate to... UDC > 7000 split. See the weak little toggle? (I'd love to upgrade this things graphics).

Every time it is clicked, the page snaps its top edge to the centerline of the toggle. When you click it again to switch back... the page snaps even lower to align with the top of my key features tab area.

What the heck?!   I have seen this in IE and FF, both latest v. I have inspected this element and poked around the style.css where it appears some attributes for this thing are found. I'm not sure if there might also be something in the function.php to control this?

GOAL: I want it to stay PUT when clicked, and stop snapping the page up and down when loading the alternate page.

My most sincere thanks in advance. Also, If you can peel my site like an onion, I might have some work for you.
TimberJonDirector of ITAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Robert SchuttSoftware EngineerCommented:
I think you need to get rid of the
href="#options"

Open in new window

(and events in the other state) in the <a> tag around the image because:

1) there is no <a name="options">
2) you change the url afterwards (in the onclick) so it seems useless to me

Try this:
href="javascript:void(0)"

Open in new window


However, the navigation action in itself may still cause a 'jump'.
0
TimberJonDirector of ITAuthor Commented:
Thanks for the info. I cannot find where this line exists except in the source code, but it looks like this is a trigger #events for the one page, and #options for the other, with each linking back and forth to each other.

I don't think this is related to a button that loads another page. Are these #attributes just bundling a script for both the swapout of the toggle image and linking to the other page?

I need to find where to edit this button/toggle's properties, like where it is linking to. I have tried a Find for #events and #options on every css I know but can only find one reference in the primary style sheet that just lists 28px which is probably just it's position since the page snaps much farther than 28px each click. Would they be found in any php files?
0
Robert SchuttSoftware EngineerCommented:
> Would they be found in any php files?

Yes, if it's not in your own sources than it could be generated in server side code like php. Any chance you could post that?

Maybe there's a call to a function in an included file which generates that block of html and could be influenced with parameters?
0
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

TimberJonDirector of ITAuthor Commented:
I will dig through the php's and see if I can find any reference to these. I will post whatever pops up.

The thing that bugs me is that I'm so used to opening the htm or html file and digging through the code. Bingo! I find everything I need. With wordpress... there doesn't seem to be any physical pages, everything is calling on everything else. And with a custom site this complex, some of my pages AND posts are all blank, with their content being controlled by who knows how many other files.

Reading through all the material at w3schools is helping a bit, but only a bit. My css and php kung fu is about 4 days old.
0
Robert SchuttSoftware EngineerCommented:
Ah, I must admit I hadn't 'peeled' far enough to discover it was a Wordpress site, you hadn't mentioned it in your question. I haven't worked with that before but have worked with a number of CMS applications and it's usually possible to hide code in templates which sounds like what you're describing: a 'blank' page can only mean that the actual content is being generated elsewhere.

Can you describe in more detail how this page is defined, maybe provide a screendump?
0
Michel PlungjanIT ExpertCommented:
I shudder a little when I see javascript:void and w3schools (go to w3fools.com to see why)
I also shudder when I see Wordpress because it has so far been ridiculously hard to find anything in Wordpress.

That said, I'll fire up firebug and see what the CSS says. It will have to wait till after breakfast and as already said, it is possible we will find the culprit in the view source but not in the wp sources
0
Michel PlungjanIT ExpertCommented:
Change
<a onclick="window.location="http://sbravo.com/udc-sump/b-7000-split"" href="#options">
<img alt="" src="http://sbravo.com/wp-content/themes/bravo/images/right_slideshow_btn.png">
</a>
to

<a onclick="window.location="http://sbravo.com/udc-sump/b-7000-split; return false"
href="#options">
<img alt="" src="http://sbravo.com/wp-content/themes/bravo/images/right_slideshow_btn.png">
</a>

or better

<a href="http://sbravo.com/udc-sump/b-7000-split">
<img alt="" src="http://sbravo.com/wp-content/themes/bravo/images/right_slideshow_btn.png">
</a>

There is no reason for javascript at all

The reason you jump is because ID="options" is defined

<div id="options" class="ui-tabs-panel ui-widget-content ui-corner-bottom clearfix ">
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ray PaseurCommented:
@Michel:
shudder when I see Wordpress
I could not agree more.  It's the perfect tool if you want to do only Wordpress things, like write an occasional blog entry.  Once you try to extend its functionality to build a web application you're in a morass!

No points for my rant, please.  Best to all, ~Ray
0
TimberJonDirector of ITAuthor Commented:
Thank you all. w3fools is great, thank you for that. I will definitely dig up the resources listed there.

I see this code in the page source, but cannot find it anywhere.. I am finding for "onclick" in all php and css documents I can find in my custom theme dir.
0
Michel PlungjanIT ExpertCommented:
So it must be in a plugin somewhere
0
TimberJonDirector of ITAuthor Commented:
Still waiting to test this codefix out. Threads not dead yet.
0
TimberJonDirector of ITAuthor Commented:
My dev fixed it, but I supplied them the above code. Since they were probably scratching their heads, I am betting my money that mplugjan's suggestion did the trick.

THANKS!
0
TimberJonDirector of ITAuthor Commented:
Clear and concise cause and provided codefix. Thanks a ton.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.