jquery-ui

jquery autocomplete that validates entered value

一个人想着一个人 提交于 2020-01-15 05:08:08
问题 I am using jquery and looking for a autocomplete that will support the mustMatch option (where the user must enter an exists item name) -> this is not a problem since there are several autocompletes that do so. The problem is that I need the autocomplete will test the entered value. For example: The user enters "England". A list opened with "England". The user doesn't hit the list item (don't select England), but just click outside the input. Most autocompltes that support mustMatch will

how to change jquery dialog buttons

…衆ロ難τιáo~ 提交于 2020-01-15 04:05:06
问题 I would like to replace the jquery dialog's buttons with images of my own buttons. What is the tidiest way of doing this? There will be no text overlayed on the buttons. I am using jquery 1.4.2 and jquery-ui 1.8.1 回答1: Maybe in the open event of the dialog retrieve the buttons and remove the ui-button classes and add your own. var buttons = $(dialog_selector + ' .ui-dialog-buttonpane button'); for (var i = 0; i < buttons.length; ++i) { $(buttons[i]).removeClass('ui-button-text-only')

Passing FullCalendar date to my dialog box modal form

前提是你 提交于 2020-01-15 03:53:51
问题 I'm using fullcalendar and what I want is that the date clicked be passed to a dialog box modal form(asp.net mvc PartialView). This is my code right now: $calendar.fullCalendar({ events: "/Home/CalendarData", dayClick: function (date) { $calendar.fullCalendar("renderEvent", { title: "on process", start: date}, true); $("#editDialog").html('') .load("/Home/About", function () { $("#editDialog").data("value", date).dialog("open"); }); } }); As you see i already tried passing a value to my

'cannot call methods on tooltip prior to initialization' error when I add the jquery-ui library

拈花ヽ惹草 提交于 2020-01-15 03:23:09
问题 I get the 'cannot call methods on tooltip prior to initialization' error when I add the jquery-ui library to my loaded scripts. Without it everything works fine. What could be the cause of this? The error: Uncaught Error: cannot call methods on tooltip prior to initialization; attempted to call method 'show' n.extend.error @ jquery.min.js:2 (anonymous function) @ jquery-ui.min.js:6 n.extend.each @ jquery.min.js:2 n.fn.n.each @ jquery.min.js:2 e.fn.(anonymous function) @ jquery-ui.min.js:6

jQuery UI Draggable with Bootstrap layout

♀尐吖头ヾ 提交于 2020-01-14 14:12:10
问题 jQuery draggable elements goes under the bootstrap styled columns (col-*). For example, I have two .row each divided into 4 columns (with col-md-3 ). I am trying to get the first row columns to be draggable onto 2nd row droppable columns. But when I drag 'Drag #' elements, they always go under the 'droppable' elements. I am not able to get drop working with Bootstrap styles. Can someone explain why this is happening and provide a solution? Bootply Exmple: http://www.bootply.com/THBX5GJnCn 回答1

Apply different CSS to different jQuery datepickers

只愿长相守 提交于 2020-01-14 14:12:08
问题 I have several datepickers tied to input fields. They are created in the usual way: $('#input1').datepicker(options1); $('#input2').datepicker(options2); Now I want to style them differently for each field. But when inspecting the page in Firefox, I see that each datepicker is a div with the same id : ui-datepicker-div ! And they aren't descendants or siblings of input fields, so I don't see a way to use the inputs' id s in CSS selectors. 回答1: I think that you'll have to use beforeShow or

jQuery UI Draggable with Bootstrap layout

冷暖自知 提交于 2020-01-14 14:09:25
问题 jQuery draggable elements goes under the bootstrap styled columns (col-*). For example, I have two .row each divided into 4 columns (with col-md-3 ). I am trying to get the first row columns to be draggable onto 2nd row droppable columns. But when I drag 'Drag #' elements, they always go under the 'droppable' elements. I am not able to get drop working with Bootstrap styles. Can someone explain why this is happening and provide a solution? Bootply Exmple: http://www.bootply.com/THBX5GJnCn 回答1

Apply different CSS to different jQuery datepickers

杀马特。学长 韩版系。学妹 提交于 2020-01-14 14:08:23
问题 I have several datepickers tied to input fields. They are created in the usual way: $('#input1').datepicker(options1); $('#input2').datepicker(options2); Now I want to style them differently for each field. But when inspecting the page in Firefox, I see that each datepicker is a div with the same id : ui-datepicker-div ! And they aren't descendants or siblings of input fields, so I don't see a way to use the inputs' id s in CSS selectors. 回答1: I think that you'll have to use beforeShow or

open jquery modal dialog on page load

こ雲淡風輕ζ 提交于 2020-01-14 12:48:10
问题 I have a page, i want it to display some content in a modal dialog (jquery UI dialog) as soon as the page is loaded. $(document).ready(function(){ $("#example").dialog(); }); <div id="example" class="flora" title="This is my title"> I'm in a dialog! </div> Thanks 回答1: Your div tag isn't properly formatted and it needs to be closed. The following worked for me, but it needs proper CSS files. <html> <head> <script type="text/javascript" language="javascript" src="jquery/jquery.js"></script>

Combining a local source and remote source in jquery ui autocomplete

落爺英雄遲暮 提交于 2020-01-14 10:09:17
问题 I included locally in javascript a list of commonly used terms, and then I would also like to get json response from the server through ajax response. How can it be done? var projects = ["apple", "orange"]; $('#search').autocomplete({ source: projects }); then append the result from ajax? 回答1: The way you would go about this would be to combine the results you get back from the server with the local results array. You can accomplish this by passing a function to the source option of