I have a easyui Tab with 4 tabs.
Depending on response from server I may have to hide/show some tabs.
I tried the approach of removing the tabs at first and adding them later.But the problem is as the tabs are removed so as the DOM objects.So am not able to add the $("#") object later.
So better options is to hide/show the tabs .Is that possible in easyui tabs?
just close the tabs that you don't want to show
$('#mytabs').tabs('close','titletab');
Related
I am using this template
You can scroll down to WORK section which is the portfolio section filterable.
The already selected option is "ALL" and that shows all the items. I want to get rid of it and make one of the other tabs active.
I tried removing the tab and add class 'selected' to one of the other tabs which make it look active but it's still showing 'ALL' items and not just the active tab unless I click on any other tab and select it back.
I'm not too good with java script so an easy instructions will be really appreciated. Thank you so much.
Just trigger the click event too while you make any tabs active like one below:
$('[data-option-value=".web"]').trigger('click');
Run the above code in console of the link given by you and you can see the changes. You can choose any of the tab to be active.
Using J Query mobile 1.4.0
I have a form that has many expandable elements with multiple check boxes. When I click my refresh button I can clear all the users selections, however the different field sets remain expanded. I could refresh the page however I don't think that is a smooth option. Other than writing JS for each field set is there a method to reload the form or collapse all form elements?
A good example for a list view However this is for individual lists. I will need this code to apply to all form elements (collapsible fieldsets)
To collapse or expand a collapsible programmatically, use .collapsible() widget with collapse or expand arguments.
/* collapse */
$(".selector").collapsible("collapse");
/* expand */
$(".selector").collapsible("expand");
I have an accordion of 5 panels. Each panel contain a set of checkboxes. I want to attach the change event to the checkboxes. But as the panels are collapsed the checkboxes dont get rendered and as a result I cannot attache the events. Any idea how do I do this.
Note : I am using ExtJS designer to make the accordion and the checkboxes.
Stuff done so far.
I added a class to the checkboxes and tried to access them using the query
Ext.query('.winrej');
this however gives me list of checkboxes from the panel that is open.
If the checkboxes are not rendered yet you will not catch any user interaction events, so it doesn't make sense to subscribe to them. Try to subscribe to events after certain panel of accordion layout has been rendered. Or am I missing something? What exactly are you trying to achieve?
The jQuery sample jQuery UI Tab manipulation show's an example of how to make all tabs of a control closeable. But is there any way to make only some tabs closeable and let some stay uncloseable?
Yes, from the code sample you found, you just have to adapt it to use a different tabTemplate for uncloseable tabs (simply remove the close icon)
I have a tab panel.
It can add tabs dynamically by clicking the add tab button.
A typical use case scenario will be this:
I have multiple tabs open Tab-1, Tab2, Tab-3, and Tab-4 in the panel
and remove some of them Tab-2 and Tab-3 from the panel by closing the tabs.
This will leave Tab-1 and Tab-4 in the panel.
Now, if i try to add new tabs, order in which the tabs are is Tab-1, Tab-4, Tab-2, Tab-3.
I want to sort the panel in jquery and make it Tab-1, Tab-2, Tab-3, and Tab-4
Please Help!!
AFAIK jQuery UI doesn't provide this natively.
The order of the tabs is defined by their order in the DOM.
Get a plugin that can sort any dom element and use it to sort the tab divs (or LI, or whatever type of element is necessary).
Some quick examples I found are
http://tinysort.sjeiti.com/
http://james.padolsey.com/javascript/sorting-elements-with-jquery/
and of course: https://www.google.com/search?q=jquery+sort+elements