无法从dropkick插件更改dk_toggle宽度 [英] Can't change dk_toggle width from dropkick plugin

查看:194
本文介绍了无法从dropkick插件更改dk_toggle宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用dropkick jQuery插件

我知道,dk_toggle有默认宽度:220px:

I'm using dropkick jQuery plugin

I know, that dk_toggle has default width: 220px:

      <a class="dk_toggle" style="width: 220px; ">(from Google console)

我的视图中的html:

My html in my view:

     <select name="country" class="default" tabindex="2">
          <option value="EN">English</option>
          <option value="IS">Israeli</option>
          <option value="UA">Ukrainian</option>
        </select>

但我想在我的css文件中更改它:

But I want to change it in my css file:

 .dk_toggle {
 height: 15px;
 width: 245px;
}

它不会改变。

推荐答案

在您的javascript文件中添加

In your javascript file add

$(document).ready(function() {
    $('.dk_toggle').css('width','220px');
})

这篇关于无法从dropkick插件更改dk_toggle宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆