-
AuthorPosts
-
June 26, 2017 at 11:43 pm #1044327
Hi,
How can i Adding custom tags style in MultiSelect Dropdown ?
Thank You
-
Mo0nlight Moderator
Mo0nlight
- Join date:
- September 2014
- Posts:
- 707
- Downloads:
- 38
- Uploads:
- 107
- Thanked:
- 99 times in 97 posts
June 28, 2017 at 9:17 am #1044695Hi.
Open the file:
/modules/mod_jak2filter/tmpl/default.phpLook for :
jQuery(window).load(function () {
Add this code under.
jQuery('select').each(function(){ var $n = jQuery(this).next(); if ($n.hasClass('chzn-container')) { $n.click(function(){ setTimeout(function(){ $n.find('li.active-result').addClass('wantedclass'); }, 200); }); } });
June 28, 2017 at 1:08 pm #1044759Dear Mo0nlight ,
Many thanks for your replay ,
I need to add style , not class And I want to copy the span quantity at style span.
Also I want this rule to be happen at the time of page loading and not by clicking, if possible
Thank You
Mo0nlight ModeratorMo0nlight
- Join date:
- September 2014
- Posts:
- 707
- Downloads:
- 38
- Uploads:
- 107
- Thanked:
- 99 times in 97 posts
June 30, 2017 at 2:37 am #1045150Hi.
the Select box using chosen jQuery.
So the "li" list will not show up until you click to the box. So it’s impossible to add when first load.You can change the code from add class to add style.
Change the line.
$n.find('li.active-result').addClass('wantedclass');
To
$n.find('li.active-result').css('attribute', 'value');
And i don’t understand what you mean about the span ?
July 3, 2017 at 4:59 am #1045605Hi,
Please consider to attached file .
This is structure of Select box .
I want to copy the span quantity at style span.
Thank You
- This reply was modified 7 years, 5 months ago by abtalebi.
July 4, 2017 at 6:21 pm #1046064Your team is too late in answering !
I opened the topic on 26th of June, but the result is still not clear .
Luna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
July 5, 2017 at 2:36 am #1046170July 5, 2017 at 5:21 am #1046222July 6, 2017 at 6:12 am #1046482Hi ,
I know that the structure that I said is not correct. This was just a example that you understand what I want to do.
I just want to copy the value which is shown in span in the style sheet. No matter what that meansThank You
Mo0nlight ModeratorMo0nlight
- Join date:
- September 2014
- Posts:
- 707
- Downloads:
- 38
- Uploads:
- 107
- Thanked:
- 99 times in 97 posts
July 10, 2017 at 4:29 am #1047153Hi.
You can change the code to.
jQuery('select').each(function(){ var $n = jQuery(this).next(); if ($n.hasClass('chzn-container')) { $n.click(function(){ setTimeout(function(){ $class = $n.find('span').text(); $n.find('li.active-result').addClass($class.toLowerCase().replace(/\s+/g, '')); }, 200); }); } });
AuthorPostsViewing 10 posts - 1 through 10 (of 10 total)This topic contains 9 replies, has 3 voices, and was last updated by Mo0nlight 7 years, 5 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum
-
Add stylesheet to li and option tag
Viewing 10 posts - 1 through 10 (of 10 total)