We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

ejTab cssClass Erorr

Hi,

We have encountered this question when we use the object,


http://help.syncfusion.com/js/api/ejtab#methods:additem  as specified in the document We give the name of a url that we  build in a specific object with id. However, we determined that the object document indicated as "MyClass". ıt does not contains  definition.  In the same document we use first example.


tabObj.addItem(url, "New Item", 3, "myClass", "newItem");

when analyzed this script  div consist of the name of  "newItem" but this div not having "myclass" feature.

How do we solve this problem?












                   

             



Regard,

Irfan

Attachment: ejTab_8ff542c3.zip

3 Replies

KR Keerthana Rajendran Syncfusion Team July 28, 2016 09:13 AM UTC

Hi Irfan , 
Thank you for contacting Syncfusion support. 
For your clarification in this code: 

tabObj.addItem(url, "New Item", 3, "myClass", "newItem"); 

myClass will not be appended to div element of created tab and it will be appended to li element of tab as span class. This class can be used to set image or icon for tab header. 
   
We have prepared a sample for your reference please refer the below given link:   
 
   
<code>   
<style type="text/css" class="cssStyles">   
  .myClass   
      {   
        width:20px;   
        display:inline-block;   
        height:15px;   
        background-image:url("http://js.syncfusion.com/demos/web/content/images/tab/flags.png");   
       margin-right: -9px;   
        margin-left: 9px;   
      }   
    </style>   
</code>   
  
   
Please let us know if any concern   
  
Regards,   
Keerthana.   
  
 



IA Irfan Alkan replied to Keerthana Rajendran July 28, 2016 12:07 PM UTC

Hi Irfan , 
Thank you for contacting Syncfusion support. 
For your clarification in this code: 

tabObj.addItem(url, "New Item", 3, "myClass", "newItem"); 

myClass will not be appended to div element of created tab and it will be appended to li element of tab as span class. This class can be used to set image or icon for tab header. 
   
We have prepared a sample for your reference please refer the below given link:   
 
   
<code>   
<style type="text/css" class="cssStyles">   
  .myClass   
      {   
        width:20px;   
        display:inline-block;   
        height:15px;   
        background-image:url("http://js.syncfusion.com/demos/web/content/images/tab/flags.png");   
       margin-right: -9px;   
        margin-left: 9px;   
      }   
    </style>   
</code>   
  
   
Please let us know if any concern   
  
Regards,   
Keerthana.   
  
 


Hi,
Thank you for your interest and your solution.  We need to add div element  id="newitem"
 
Regard,
Irfan


KR Keerthana Rajendran Syncfusion Team July 29, 2016 09:12 AM UTC

Hi Irfan,   
  
Inside the addItem method which is passed in the first parameter will be considered as tab id and that will be automatically set to div element id of tab. 
 
 tabObj.addItem(“#newItem”, "New Item", 3,”myClass”); 
 
 If you want to modify the id of div element you can pass an additional parameter which represents the id of the tab.(this is optional parameter)   
 
tabObj.addItem(“#newItem”, "New Item", 3,”myClass”,” New tab”);    
 
We have prepared a sample for your reference.   
 
Please refer the below given links:   
  
 
  
If we have misunderstood your requirement, please revert with some additional details on your query.   
  
Regards,   
Keerthana.  


Loader.
Up arrow icon