GithubHelp home page GithubHelp logo

janking / dropdown Goto Github PK

View Code? Open in Web Editor NEW
108.0 9.0 23.0 1.08 MB

a lightweight dropdown of jQuery plugins

Home Page: https://janking.github.io/dropdown/

License: MIT License

HTML 2.04% CSS 2.24% JavaScript 95.72%
jquery jquery-plugin jquery-ui selector dropdown

dropdown's People

Contributors

janking avatar moh-slimani avatar shirishparsekar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dropdown's Issues

choose函数问题

$('.dropdown-mul-1').eq(i).data('dropdown').choose(hasselect[i])

user-info.js:54 Uncaught TypeError: $(...).eq(...).data(...).choose is not a function

问题

特殊字符串 你这边正则是不是没有过滤? data-value=“” 对于 { } 和 - 符号 好像不识别

Clear all items

Hi,
have a nice day,
How can i easily clear the list (delete all items).

Thanks in advance

Pre-select options

Hello,

How do I pre-select options on load?

Can it be done via callback?

Is there anyway to use onchange() call back function in label mode?

Currently there is only this "choice" option that allow a user to in a callback function. This work well if the 'label' mode is not set. When the 'label'mode is set, the 'choice' function is not being called while the user clicking the erase button from the label to deselect a button. I have also tried chain binding to the original select but it does not work too.

Not being able to access POST data

Hello,

Everything works very well, but I can't get data with PHP. (only 1)

For example:

Result:

2

PHP Code:

$yillar = array($_POST['test']); 
var_dump($yillar); 

What could be the reason?
Thank you.

发现了一个关于destroy的BUG

destroy之前没有取消控件的事件监听,会导致重新建立控件的时候出现多次触发event的BUG导致选择失效,在destroy()删除DOM元素之前先this.unbindEvent(); 可修复此BUG

多选、JSON渲染、分组功能,在 searchable = false 时,下拉数据不显示

var jsonArray = [
{
"id": 1, // value值
"disabled": false, // 是否禁选
"groupName": "分组名",
"groupId": 3,//分组ID
"selected": false, // 是否选中
"name": "Betty Deborah Jackson" // 名称
},
{
"id": 2,
"disabled": false,
"groupName": "分组名",
"groupId": 2,
"selected": false,
"name": "Jason Barbara Clark"
}
]
$('#dropdown-mul').dropdown({
data: jsonArray,
multipleMode: 'label',
searchable: false,
choice: function () {
console.log(arguments, this);
}
});

choose的问题

你好,在使用.data('dropdown').choose()的时候,如果我select标签里的value不是0,1,2,3,多选的显示不出来吗?
image

有几个bug

1、.dropdown-display要加上outline:none;否则当鼠标点击的时候outline会很难看,
2、.dropdown-main的margin-top由-1改为0,否则会挡住dropdown-display的下边框
3、点击dropdown-display会打开下拉框没问题,但是第二次点击的时候应该关闭,没有关闭掉,跟原生的select行为不一致,用起来感觉很别扭的

低版本的谷歌浏览器中点击事件失效

今天发现在谷歌浏览器37.0.2062.0版本下,下拉列表都能初始化,数据也能动态加载,但是点击时没有任何反应,就跟被disabled一样,有谁可以知道对应的触发事件对象是哪个?[email protected],我的邮箱地址,希望大家能够提供一些线索

修改文本框中的值

是这样,假如1.test这个选项,
我点击选择之后,1.test放入select选项框,但是我不想用1.test
而是想用test,有什么方法处理这个值然后再放进去么

关于搜索大小写检索问题

不支持大写检索
js文件240行,条件少了个转大写
$.each(data, function (key, value) {
if (value.name.toUpperCase().indexOf(intputValue) > -1||value.name.toLowerCase().indexOf(intputValue) > -1|| '' + value.id === '' + intputValue) {
result.push(value);
}
});

如何获取data-id 值?

console.log($(this.name[0]) 得到的是

< span class="dropdown-selected">ccc< i class="del" data- id="danny">< /span>

< span class="dropdown-selected">5< i class="del" data -id="vivien">< /span>

可是怎么获取danny和vivien呢?

set selected option from AJAX call

I have a set of data with 4 values [1, 2, 3, 4] from the AJAX call, and when I click the edit button, the dropdown doesn't set automatically the selected value. I would want to know if there is any way to set the dropdown option value set by the AJAX call. Below are the examples.

2020-09-09 09_31_10-Window
2020-09-09 09_32_53-Window

Encoding problem?

Is something wrong with the encoding or my browser, or is really every help and description in Chinese? It seems that this is far the best component I have found for my project, but I am not sure how to use it this way :( I would be really disappointed...

分组查询

我想问下,下拉搜索能按分组名搜索吗?文本框中输入要查询的分组名,然后筛选出该分组下的数据,麻烦指导一下,谢谢!

2个优化建议

标签中默认没有option时,会报错,建议在第458行加上判断if(_this.name == null){_this.name = [];} 启动方法为什么不是$('#select_id').dropdown(.......),由插件在select上层添加一个div

“多选、Option渲染” 有bug

多选后 点删除按钮 ,就是输入框右边那个“x”这个按钮,清空后,重新选,会发现上次的多选的内容又显示了

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.