jquery-ui

how to prevent the click event of the parent when its children is being dragged

落爺英雄遲暮 提交于 2021-01-28 10:14:05
问题 Here is a sample code: $('.bmc-div').click(function(e){ e.stopPropagation(); // console.log(e.target); if ($(e.target).hasClass('my-sticky')) { } else { canvas.add_sticky($(this)); } }); $('.bmc-div .sticky_container').sortable({ cursor: 'move', revert: true, helper: 'clone', // handle: ".element-handler", connectWith: '.bmc-div .sticky_container', scroll: true, cancel: null, opacity: 0.7, // axis: 'y', items: ".my-sticky", placeholder : "sticky-placeholder", containment: "#main", zIndex:

Jquery UI Slider incorrect max value

♀尐吖头ヾ 提交于 2021-01-28 08:04:33
问题 I am initializing a jquery ui slider that has for example a value of .01, a min of .01, and a max of 5000. My issue is that the max is stopping at 4999.990000000001. Can you see what I am doing wrong? $( "#sliderModal" ).slider({ value:r.min_price/100, min: r.min_price/100, max: r.max_price/100, step:0.01, slide: function( event, ui ) { $( "#amountModal" ).val(ui.value ); } }); 回答1: It's a rounding error related to the float values. The easiest way to fix it would to use integers instead: $(

JQuery UI: remove Bootstrap tooltip on a draggable clone when drag starts?

三世轮回 提交于 2021-01-28 07:31:41
问题 I am using JQuery UI for drag and drop in my project. On the draggable element, I have Bootstrap (3.x) tooltip. Moving the mouse over the draggable shows the tooltip. I hope to remove/hide tooltip on the draggable clone when drag starts. I goolged and tested, but to no success. Here is jsfiddle setup of the whole thing. Link: http://jsfiddle.net/mddc/6md9h/18/ <div id="draggable" class="ui-widget-content"> <div data-toggle="tooltip" data-original-title="Tooltip to disappear when drag starts."

gridview row delete with jquery dialog

感情迁移 提交于 2021-01-28 06:43:11
问题 Everything is working fine except that postback does not occur when I delete the row. I put a debugger break inside the OnRowDeleting and OnRowDataBound The only difference is that you don't have Ajax update panel and script Manger. Below is the image of the Gridview. Nothing happens When I click the ok button. Below is my code on fresh page: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm3.aspx.cs" Inherits="SidePanelGridViewTest.WebForm3" %> <!DOCTYPE html> <html xmlns=

changing language of jquery-ui datepicker

余生颓废 提交于 2021-01-28 06:41:15
问题 hello im new to jquery and since my application is in french I want to change the language of datepicker to match it since not everyone who will use the app knows english Here is my datepicker with jquery-ui as a simplified version: <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> <script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script> $(document).ready(function (

Return sql query as array

那年仲夏 提交于 2021-01-28 05:20:16
问题 I'm using jqueryui and its Autocomplete plugin. It use a json to extract items. I want to modify it so that items will be extracted from my db. Here is how items should be : $items = array( "Great <em>Bittern</em>"=>"Botaurus stellaris", "Great2 <em>Bittern</em>"=>"Botaurus stellaris 2" ); How to make an sql query that extract data from a table and write it like the code above into the php file ? Table : customer id_customer | name_customer | country_customer I want that array produce id

Make jQuery UI autocomplete source dependent on another autocomplete

扶醉桌前 提交于 2021-01-28 04:08:28
问题 The problem is in the title, I don't know how to make an autocomplete widget dependent on the other. In my example, I have 2 columns in my database: firstName lastName And some rows: Dupont Francois Dupont Oliver Lapeche Jean If I enter Dupont in the first autocomplete input, I want the second autocomplete to suggest Oliver and Francois , not Jean ! This is my code HTML : <form action="../../controler/add/addUserDevice.php" onsubmit="return verifUserDevice(this)" method="post"> <table> <tr>

Make jQuery UI autocomplete source dependent on another autocomplete

余生颓废 提交于 2021-01-28 03:48:00
问题 The problem is in the title, I don't know how to make an autocomplete widget dependent on the other. In my example, I have 2 columns in my database: firstName lastName And some rows: Dupont Francois Dupont Oliver Lapeche Jean If I enter Dupont in the first autocomplete input, I want the second autocomplete to suggest Oliver and Francois , not Jean ! This is my code HTML : <form action="../../controler/add/addUserDevice.php" onsubmit="return verifUserDevice(this)" method="post"> <table> <tr>

jQuery Autocomplete source dependent from different input

元气小坏坏 提交于 2021-01-28 00:18:34
问题 The solution for only 2 options is posted here @VinayC : jQuery UI - Autocomplete source dependent from selected option in different input But I need a solution for more than two options in my select? The code is here: http://jsbin.com/fakuwohupa/edit?html,js,output <select id="country"> <option value="">Choice one</option> <option value="1">US</option> <option value="2">UK</option> <option value="3">GR</option> <option value="4">IT</option> </select> <form id="aspnetForm" action="" method=

Jquery UI sortable - sort items only on drop event

谁说我不能喝 提交于 2021-01-27 20:36:48
问题 I want to disable sorting of items when item is dragged. Only after the drop has been completed the items must sort accordingly. Thanks, Vimalraj Theerkatharisi $(function() { $( "#sortable" ).sortable({ tolerance: 'pointer', revert: 'invalid', forceHelperSize: true, scroll: true, forcePlaceholderSize: true, placeholder: 'ui-state-highlight', helper: 'clone', containment: 'parent', cursor: 'move', distance: 5, opacity: 0.3, }); }); jsfiddle 来源: https://stackoverflow.com/questions/30324564