Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].
Hello,
I’m using a jQuery to intially hide on row and only show the first row. The user can then switch and show a different row.
This is the script:
<script> jQuery(document).ready(function() { jQuery('#divcontent2').hide(); jQuery('#showall').click(function(){ jQuery('.targetDiv').show(); jQuery('.showSingle').removeClass("activetoogle"); jQuery('#showall').addClass("activetoogle"); }); jQuery('.showSingle').click(function(){ jQuery('.targetDiv').hide(); jQuery('#showall').removeClass("activetoogle"); jQuery('.showSingle').removeClass("activetoogle"); jQuery('#divcontent'+jQuery(this).attr('target')).show(); jQuery(this).addClass("activetoogle"); }); });
The problem here is that the row (that is intially hidden) with layout “streched” and a background-color calculates the left margin wrong, when i show it by click on a button. So the backgroundcolor start with the content on the left and streches to the right.
Image here: Screenshot
Do you know a solution for this?
Hi Simon,
Do you have a public URL where we can take a look at what’s going on?
The mentioned code shouldn’t cause any issues with our Full Width JavaScirpt as it applies regardless of visibility so I suspect something else may be interfering or there may be a general difference not highlighted that’s preventing our code from affecting your rows.
Hello Alex,
thank you for your fast reply.
https://www.campushelfer.de/de/siteorigin-test/
and the password for this single page: test1
The situation descriped above appers if you click on the right button “Ich bin Kunde”.
Thank you!
Simon
Hi Simon,
Thanks. Unfortunately, I’m not too sure why this is happening I would replicate the code we use to stretch rows to allow for the rows to be stretched.
Hello Alex,
ok what a pitty. So by replicate you mean i should put the code in my function and executed “the streching” again manually?
Hi Simon,
Yes. You’ll need to manually stretch your rows to accomplish your desired setup. Sorry mate.
i’m not too familiar with jquery and stuff, so I use a little workaround now by applying
margin-left:-300%!important;
margin-right:-300%!important;
padding-left:300%!important;
padding-right:300%!important;
to the two rows i would like to style. Works for now.