MyBB Community Forums

Full Version: Tabs UI Issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've got the Jquery ui tabs going on my site. When I first install it (the last couple of times, literally straight from this page: http://api.jqueryui.com/tabs/) it works perfectly, but as soon as I refresh the page for any reason, it breaks.

It will start displaying ALL content tabs, instead of just the active one. The only mention of this I can find is here:

http://stackoverflow.com/questions/14361...bs-on-load

I've tried the fixes listed in this thread, and they didn't help. Just like the last bloke that posted there, all of my tab contents are display display:block, overriding anything else I have set previously. Putting style="display:none;" in the items themselves make them simply disappear, and not reappear when I active their tab. Placing the same thing in a <style> tag will simply not work, and they will go back to display:block;

JAVASCRIPT
 <script>
(function($) {
        var tabOpts = {
            hide: {
                effect: "blind",
                duration: 800
            },
            show: {
                effect: "blind",
                duration: 800
            }

        };
        $("#tabs").tabs(tabOpts);
    })(jQuery);
</script>

HTML
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>

<div id="tabs">
  <ul>
    <li><a href="#fragment-1">One</a></li>
    <li><a href="#fragment-2">Two</a></li>
    <li><a href="#fragment-3">Three</a></li>
  </ul>
  <div id="fragment-1">
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
  </div>
  <div id="fragment-2" style="display:none;">
   2222 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
  </div>
  <div id="fragment-3" style="display:none;">
  444444  Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
  </div>
</div>

Does anyone know what the heck is going on!? Like I said, when I first install it, it works wonderfully. But even if I go edit something else entirely and refresh, it stops working again. I just don't even know what to do with it, or why it's doing this.

I'd also like to mention I have no "div" specific css styling.
Do you have noConflict set up? Jquery doesn't work properly on myBB without it because it tends to intefere with the prototype library.
(2013-10-04, 05:08 PM)jshort Wrote: [ -> ]n
Do you have noConflict set up? Jquery doesn't work properly on myBB without it because it tends to intefere with the prototype library.

Golly tamale, this is the first I'm hearing of it! How do I go about that?

I've add this to my header include above my jquery and jquery ui files:
<script>
    jQuery.noConflict();
</script>


I resolved it, but I still need some help figuring out why my UI isn't working. I have the effects core I think, so I'm trying to figure out why my tabs don't animate.

And I'm still have the same conflict. Is there a tutorial around the shows me how to actually use it with my codes?

Here's my hostings:
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
So is this going to be the sixth thread I've posted in a month that just get's no response? Cause I've got a total of five issues that I've come here for help with, and I just blatantly ignored, or someone posts once and just drops it, all in the last month. This is getting really irritating, and it's got me on the verge of just going to another service.
(2013-10-05, 05:57 PM)WitherBones Wrote: [ -> ]So is this going to be the sixth thread I've posted in a month that just get's no response? Cause I've got a total of five issues that I've come here for help with, and I just blatantly ignored, or someone posts once and just drops it, all in the last month. This is getting really irritating, and it's got me on the verge of just going to another service.

I posted yesterday in response to your question. I understand being frustrated at lack of support, but people also don't sit around all day answering questions. If you want help, you need to have some patience. I realize this wasn't aimed directly at me, but still.

Do you have a URL where we could see this behavior?