Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build a customizable custom selected tabs styles using simple JavaScript, CSS with Count (Index) value on click tab button #7

Open
vijayk3327 opened this issue Sep 13, 2023 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@vijayk3327
Copy link
Owner

In this post we are going to learn about How to build a customizable custom selected tabs styles using simple JavaScript, CSS with Count (Index) value on click tab button select.

👉 Get source code live demo link:-

**Step 1:- Create HTML File : customTabs.html

customTabs.html [HTML File]**

`

<title>How to create a Customize selected tab styles in JavaScript</title> <script type="text/javascript" src="include/customTabsScript.js"></script>
w3web Blog Tutorial Technical Guide w3web Mart
w3web.net is the place where you can learn about Blog, WordPress, Salesforce Lightning Component, Lightning Web Component (LWC), Visualforce, Technical of Computer Application, Salesforce Plugin, JavaScript, Jquery, CSS, Computer and Accessories, Software Development, Configuration, Customization and much more... Read more...

It is so important to every website should be index by google. Because without indexing our website does not visible on search engine. If google search does not indexing my page. There are ‘0%’ to chance to get organic traffic. We won’t get any type of organic traffic on search results.

Google search engine does not index your site automatically. However if you want to index your website and visible on search results you need to understand about process of Indexing, Crawling and Ranking. Read more...

Hey guys, today in this post we are going to learn about How to Avoid Duplicate Name Record Simply Using a Apex Controller Method and Validating a Lightning Input Form with Email Regex Pattern Checked and Submit on Click Button in Salesforce Lightning. Read more...
<div id="tab3" class="tabList"><span class="tabImg"> <img src="https://www.w3web.net/wp-content/uploads/2020/07/remote-app2-1-1.png"  align="top"/></span> Many people writing a Blog or Article. There can be multiple pages in a single article, if you have not good hand typing speed you will be face so many difficulty.<br/><br/>

If you want to write a article English or Hindi very fast than go through the “Remote Mouse App”. Read more...

 <div id="tab4" class="tabList"><span class="tabImg"> <img src="https://www.w3web.net/wp-content/uploads/2020/10/w3webmart_SquareBanner.png"  align="top"/></span> An easy way to online shopping by - www.w3webmart.com such like as Headphone with Mic, Kids Clothing Store, Mens Clothing Store,Mobile Phone, Womens Clothing Store. <span class="readMore"><a href="#">Read more...</a></span></div>
<script type="text/javascript"> </script>
        <p data-aura-rendered-by="435:0"><img src="https://www.w3web.net/wp-content/uploads/2021/05/thumbsUpLike.png" width="25" height="25" style="vertical-align:top; margin-right:10px;" data-aura-rendered-by="436:0"><strong data-aura-rendered-by="437:0"><span style="font-size:16px; font-style:italic; display:inline-block; margin-right:5px;">Don't forget to check out:-</span><a href="https://www.w3web.net/" target="_blank" rel="noopener noreferrer" style="text-decoration:none;" data-aura-rendered-by="440:0">An easy way to learn step-by-step online free Salesforce tutorial, To know more Click  <span style="color:#ff8000; font-size:18px;" data-aura-rendered-by="442:0">Here..</span></a></strong></p>

        <br/><br/>
        <p data-aura-rendered-by="435:0"><img src="https://www.w3web.net/wp-content/uploads/2021/07/tickMarkIcon.png" width="25" height="25" style="vertical-align:top; margin-right:10px;" data-aura-rendered-by="436:0"><strong data-aura-rendered-by="437:0"><span style="font-size:17px; font-style:italic; display:inline-block; margin-right:5px; color:rgb(255 128 0);">You May Also Like →</span> </strong></p>
        <div style="display:block; overflow:hidden;"> 
            <div style="width: 50%; float:left; display:inline-block">
                <ul style="list-style-type: square; font-size: 16px; margin: 0 0 0 54px; padding: 0;"> 
                    <li><a href="https://www.w3web.net/lwc-get-set-lightning-checkbox-value/" target="_blank" rel="noopener noreferrer">How to get selected checkbox value in lwc</a></li>
                    <li><a href="https://www.w3web.net/display-account-related-contacts-in-lwc/" target="_blank" rel="noopener noreferrer">how to display account related contacts based on AccountId in lwc</a></li>
                    <li><a href="https://www.w3web.net/create-lightning-datatable-row-actions-in-lwc/" target="_blank" rel="noopener noreferrer">how to create lightning datatable row actions in lwc</a></li>
                    <li><a href="https://www.w3web.net/if-and-else-condition-in-lwc/" target="_blank" rel="noopener noreferrer">how to use if and else condition in lwc</a></li>
                    <li><a href="https://www.w3web.net/get-selected-radio-button-value-and-checked-default-in-lwc/" target="_blank" rel="noopener noreferrer">how to display selected radio button value in lwc</a></li>
                </ul>
        </div>

        <div style="width: 50%; float:left; display:inline-block">
                <ul style="list-style-type: square; font-size: 16px; margin: 0 0 0 54px; padding: 0;"> 
                    <li><a href="https://www.w3web.net/display-account-related-contacts-lwc/" target="_blank" rel="noopener noreferrer">display account related contacts based on account name in lwc</a></li>
                    <li><a href="https://www.w3web.net/create-lightning-datatable-row-actions-in-lwc/" target="_blank" rel="noopener noreferrer">how to insert a record of account Using apex class in LWC</a></li>
                    <li><a href="https://www.w3web.net/fetch-picklist-values-dynamic-in-lwc/" target="_blank" rel="noopener noreferrer">how to get picklist values dynamically in lwc</a></li>
                    <li><a href="https://www.w3web.net/edit-save-and-remove-rows-dynamically-in-lightning-component/" target="_blank" rel="noopener noreferrer">how to edit/save row dynamically in lightning component</a></li>
                    <li><a href="https://www.w3web.net/update-parent-object-from-child/" target="_blank" rel="noopener noreferrer">update parent field from child using apex trigger</a></li>
                </ul>
            </div>
           <div style="clear:both;"></div> 
           <br/>
            <div class="youtubeIcon">
                <a href="https://www.youtube.com/channel/UCW62gTen2zniILj9xE6LmOg" target="_blank" rel="noopener noreferrer"><img src="https://www.w3web.net/wp-content/uploads/2021/11/youtubeIcon.png" width="25" height="25" style="vertical-align:top; margin-right:10px;"/> <strong>TechW3web:-</strong> To know more, Use this <span style="color: #ff8000; font-weight: bold;">Link</span> </a>
            </div>
</div>
`

**Step 2:- Create JavaScript File : customTabsScript.js

customTabsScript.js [JavaScript File]**

`function tabFun(thisEl){
var getRel = thisEl.rel;
var showRelTab = document.getElementById(getRel).style;
var tabMainList = document.getElementById('tabMainSec').querySelectorAll('.tabList');
var tabLinkItem = document.getElementById('tabMenu').querySelectorAll('a');
//alert(tabMainList);

 for(i=0; i<tabMainList.length; i++){      
  tabMainList[i].style.display='none';
  tabLinkItem[i].className='';
 }

 showRelTab.display='block';
 thisEl.className='active';

}`

**Step 3:- Create Style CSS : customTabsStyle.css

customTabsStyle.css [Style CSS File]**

body{ font-size: 14px; font-family: arial;} .tabMenu{font-size: 13px; color: #333; margin-bottom: 15px; border-bottom:1px #ccc solid;} .tabMenu a{text-decoration: none; color: #333; padding: 5px 10px; display:inline-block; border:1px #ccc solid; border-bottom:0; border-radius:5px 5px 0 0;} .tabMenu a:hover{text-decoration: none; color: #fff; background:#990000; } .tabMenu a.active{text-decoration: none; color: #fff; background:#990000; position:relative; padding: 6px 10px 5px 10px; bottom:-1px; } .tabList{display: none;} .tabImg{width:150px; float:left; display:inline-block; margin-right:10px;} .tabImg img{width:150px; height:100px;} .readMore{font-size:14px; font-weight:bold; display:inline-block; padding:0 0 0 10px;} .readMore a{color:#ff0000; text-decoration:none;} .readMore a:hover{color:#04a5ca; text-decoration:underline;}

👉 Get source code live demo link:-

@vijayk3327 vijayk3327 added the documentation Improvements or additions to documentation label Sep 13, 2023
@vijayk3327 vijayk3327 self-assigned this Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: No status
Development

No branches or pull requests

1 participant