selectable

jQuery UI Selectable - unselect selected item on click

北城以北 提交于 2019-11-30 00:33:35
Does anyone know if there's a way to configure a jquery ui selectable element to unselect the selected element when you click it? Sort of like a toggle. If it's already selected, unselect it, otherwise do the default behavior. Thanks. i'm very late in responding to your question, but let me just answer it anyway so that to keep it as a reference for others. $( ".selector" ).bind( "mousedown", function ( e ) { e.metaKey = true; } ).selectable(); this will allow the toggle behavior that you're looking for. Well here's what I just ended up doing. I used a class name to toggle selecting and

TextView that is linkified and selectable?

跟風遠走 提交于 2019-11-30 00:06:38
I would like to have a TextView that is both selectable and linkified. When I do both I end up with selectable text but links can't be clicked. EDIT: I'll show the code to explain with what I struggle: TextView textView = view.findViewById(R.id.mytext); textView.setText("My text: +4412345678 Go to website: www.google.com Blah blah"); Linkify.addLinks(textView, Linkify.ALL); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { textView.setTextIsSelectable(true); } Did you try to add this on your TextView xml code? <TextView ... android:autoLink="all" android:textIsSelectable="true" />

How to get the innerHTML of selectable jquery element?

◇◆丶佛笑我妖孽 提交于 2019-11-29 15:57:29
问题 I have a php generated list whose list items are selectable using jquery selectable widget. The list for all intents and purposes is: <ul id="#select-image"> <li class="ui-widget-content">Item 1</li> <li class="ui-widget-content">Item 2</li> <li class="ui-widget-content">Item 3</li> <li class="ui-widget-content">Item 4</li> <li class="ui-widget-content">Item 5</li> <li class="ui-widget-content">Item 6</li> <li class="ui-widget-content">Item 7</li> </ul> And the jQuery selectable is declared

How to enable dblclick event on elements which was binded with JQuery UI Selectable plugin?

强颜欢笑 提交于 2019-11-29 10:39:51
In my case,I have an UL with JQuery UI Selectable plugin applied,but at the same time ,I want the item witch was binded with selectable plugin was doing something when I double click this item.But it seems that the JQuery UI Selectable plugin had block the dblclick event . So,how can I make it work? E.g: <script> $(function() { $( "#selectable" ).selectable(); $( "#selectable" ).dblclick(function(){ // do something here }) }); </script> <ul id="selectable"> <li class="ui-widget-content">Item 1</li> <li class="ui-widget-content">Item 2</li> <li class="ui-widget-content">Item 3</li> <li class=

jQuery unexpected sortable behaviour

馋奶兔 提交于 2019-11-29 00:26:54
I'm working on a project where I can generate Word documents, one of the functionalities is to define a table of contents. I want my TOC to be a sortable jQuery list for sorting the chapters. I'm retreving the data recursivly from a MySQL table, which functions as expected. Since I found there are some strange behaviors in IE7 (and possible other versions) I switched back to basics and tried the following in a simple HTML file without any DB-generated structure. <!doctype html> <html> <head> <script type="text/javascript" src="./jquery-1.3.2.js"></script> <script type="text/javascript" src=".

TextView that is linkified and selectable?

∥☆過路亽.° 提交于 2019-11-28 21:05:36
问题 I would like to have a TextView that is both selectable and linkified. When I do both I end up with selectable text but links can't be clicked. EDIT: I'll show the code to explain with what I struggle: TextView textView = view.findViewById(R.id.mytext); textView.setText("My text: +4412345678 Go to website: www.google.com Blah blah"); Linkify.addLinks(textView, Linkify.ALL); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { textView.setTextIsSelectable(true); } 回答1: Did you try to

new Selectable TextView in android 3 (API <=11) component

大憨熊 提交于 2019-11-28 10:09:25
After a long and time consuming search, I can't find a component that can select text in textview for android API level <=11. I have written this component that may be of help to you : public class SelectableTextView extends TextView { public static int _SelectedBackgroundColor = 0xffA6D4E1; public static int _SelectedTextColor = 0xff000000; private OnTouchListener lastOnTouch; protected int textOffsetStart; protected int textOffsetEnd; private OnLongClickListener lastOnLongClick; protected boolean longCliked; protected boolean isDowned; protected int textSelectedEnd; protected int

jQuery unexpected sortable behaviour

倖福魔咒の 提交于 2019-11-27 21:26:35
问题 I'm working on a project where I can generate Word documents, one of the functionalities is to define a table of contents. I want my TOC to be a sortable jQuery list for sorting the chapters. I'm retreving the data recursivly from a MySQL table, which functions as expected. Since I found there are some strange behaviors in IE7 (and possible other versions) I switched back to basics and tried the following in a simple HTML file without any DB-generated structure. <!doctype html> <html> <head>

new Selectable TextView in android 3 (API <=11) component

戏子无情 提交于 2019-11-27 03:25:31
问题 After a long and time consuming search, I can't find a component that can select text in textview for android API level <=11. I have written this component that may be of help to you : public class SelectableTextView extends TextView { public static int _SelectedBackgroundColor = 0xffA6D4E1; public static int _SelectedTextColor = 0xff000000; private OnTouchListener lastOnTouch; protected int textOffsetStart; protected int textOffsetEnd; private OnLongClickListener lastOnLongClick; protected

Making things unselectable in IE

若如初见. 提交于 2019-11-26 11:33:18
问题 Here is my chart I\'ve been writing in JS: http://jsfiddle.net/49FVb/ The css: -moz-user-select:none; -khtml-user-select: none; Works fine for Chrome/FF, but in IE all the elements are still selectable which looks weird when dragging the bars around. How can I make this unselectable in IE? 回答1: In IE, you need the unselectable attribute in HTML: <div id="foo" unselectable="on">...</div> ... or set it via JavaScript: document.getElementById("foo").setAttribute("unselectable", "on"); The thing