• Resolved karay

    (@karay)


    Hello ??
    I want to congratulate you for your work
    the best plugin Tabby Responsive that I tested

    I use Tabby Responsive Tabs basically to load players with iframes
    comme ici https://streaming-film.org/ozark-saison-1-vf/

    the problem is that too many players are loading at the same time
    which slowed the page

    I would like to trigger the loading of tab two only when clicked on
    trigger the loading of the three tab only when clicked on
    And so on

    I tried to do it myself with code found on the internet but it does not work

    could you help me please

    thank you ^^,

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author cubecolour

    (@numeeja)

    I’m glad you like the plugin.

    Attaching javascript functions to tabs is discussed in this topic: https://www.ads-software.com/support/topic/adding-javascript-actions-to-tab-clicks/

    Thread Starter karay

    (@karay)

    Hello ??
    I use it on all my sites
    it is really practical and easy to use

    must I take the code?
    I have to put it or?

    I am really bad
    thank you for being so patient with me

    function cc_tabtrigger() {
    
    	wp_enqueue_script( 'jquery' );
    
    	echo '<script type="text/javascript">
    	jQuery(function($){
    
    		$("body").on("click", "#tablist1-tab1, .responsive-tabs__heading:nth-of-type(1)", function() {
    			alert("Tab 1 Clicked");
    		});
    
    		$("body").on("click", "#tablist1-tab2, .responsive-tabs__heading:nth-of-type(2)", function() {
    			alert("Tab 2 Clicked");
    		});
    
    		$("body").on("click", "#tablist1-tab3, .responsive-tabs__heading:nth-of-type(3)", function() {
    			alert("Tab 3 Clicked");
    		});
    
    	});</script>';
    }
    
    add_action( 'wp_head', 'cc_tabtrigger', 100 );
    
    
    • This reply was modified 6 years, 6 months ago by karay.
    Plugin Author cubecolour

    (@numeeja)

    The example code shows how to enable a javascript function to be triggered when a tab is clicked. As it is an example it does not actually do anything useful. An alert acts as a placeholder for the code specific to the content to be loaded. If you already have some js code to load the content on demand this would be used in place of each alert.

    If you are not a coder and none of this makes much sense, I am afraid that this example will probably not be much use to you.

    Creating additional code specific to your site to load the content on demand is beyond the scope of the free support I am able to offer.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘the loading of tab two only when clicked on’ is closed to new replies.