test
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • abtalebi Friend
    #1044327

    Hi,

    How can i Adding custom tags style in MultiSelect Dropdown ?

    Thank You


    1. Screenshot_1-1
    2. Screenshot_58
    Mo0nlight Moderator
    #1044695

    Hi.

    Open the file:
    /modules/mod_jak2filter/tmpl/default.php

    Look 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);
                    });
                }
            });
    abtalebi Friend
    #1044759

    Dear 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


    1. Screenshot_2
    Mo0nlight Moderator
    #1045150

    Hi.

    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 ?

    abtalebi Friend
    #1045605

    Hi,

    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.

    1. Screenshot_62
    abtalebi Friend
    #1046064

    Your team is too late in answering !

    I opened the topic on 26th of June, but the result is still not clear .

    Luna Garden Moderator
    #1046170

    Hi,

    We’re a bit confused about what you need to do here.

    Cause there’s no style with value ‘sample1’, it doesn’t make sense, maybe you need add a class whose name is ‘sample1’ and then add style to this class. But in your above reply, you refuse our answer.

    Could you take a look again our answer?

    abtalebi Friend
    #1046222

    Dear Luna Garden ,

    I can not see your message if you sent something

    Thank You


    1. Screenshot_11
    abtalebi Friend
    #1046482

    Hi ,

    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 means

    Thank You

    • This reply was modified 7 years, 5 months ago by  abtalebi.
    • This reply was modified 7 years, 5 months ago by  abtalebi.
    Mo0nlight Moderator
    #1047153

    Hi.

    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);
                    });
                }
            });
Viewing 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