jquery-ui

Combining a local source and remote source in jquery ui autocomplete

ⅰ亾dé卋堺 提交于 2020-01-14 10:08:04
问题 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

why jquery datepicker doesn't work on textarea but only on input

倾然丶 夕夏残阳落幕 提交于 2020-01-14 08:53:07
问题 Please help me, i'm clueless. when I try to open the date picker of the jquery UI and attach it to input tag it works perfectly, but when i try to attach it to textarea nothing is happens. <script type="text/javascript"> $(function() { $("#${data_picker}").datepicker(); }); </script> ---- This will work ---- <input id="data_picker" /> ---- This doesn't work ---- <textarea id="data_picker"></textarea> why??? p.s of course they're not in the same page together, it's only the input or only the

Radio button not align properly at center in jquery mobile version 1.0?

霸气de小男生 提交于 2020-01-14 08:16:02
问题 I used radio button in my jquery mobile application and i'm using jquery mobile 1.0 and jquery 1.6.4. The problem is it always aligned left. So, i tried to move at center but it is not working. How to fix this? Thanks in advance. <div id="userOptionGroup" data-role="contain"> <fieldset data-role="controlgroup" data-type="horizontal" data-theme="b" style="font-size:12px;border:2px;"> <input type="radio" data-theme="b" name="radio-choice-b" id="radio-choice-wuser" value="windowUser" checked=

Radio button not align properly at center in jquery mobile version 1.0?

梦想的初衷 提交于 2020-01-14 08:15:28
问题 I used radio button in my jquery mobile application and i'm using jquery mobile 1.0 and jquery 1.6.4. The problem is it always aligned left. So, i tried to move at center but it is not working. How to fix this? Thanks in advance. <div id="userOptionGroup" data-role="contain"> <fieldset data-role="controlgroup" data-type="horizontal" data-theme="b" style="font-size:12px;border:2px;"> <input type="radio" data-theme="b" name="radio-choice-b" id="radio-choice-wuser" value="windowUser" checked=

How can I change a jQuery UI widget's options after it has been created?

孤街醉人 提交于 2020-01-14 07:28:07
问题 It seems that the usual method of making jQuery widgets is to call a function on an element, passing the options as a parameter, and then not touching the widget directly again. Is there a way to change a widget's options after it has been created? I want to create a draggable box that is aligned to a grid, but if the user resizes the page, I want to scale the grid. In the window resize event, how can I access the grid property of the draggable element? $('.box').draggable({grid: [40,40]}); .

Javascript: have div always remain at the top when it reaches the top edge of browser with jquery

不问归期 提交于 2020-01-14 05:09:05
问题 how to have a div that always stay on the screen? Lets say i have a div at the left hand site. When the browser is scroll to the bottom, the div will remain there ONLY when its' top reaches the top edge of browser screen so that it will not be hidden. I am using jquery too. Thank you. 回答1: here is a Good ScreenCast By RemySharp Regarding this Issue http://jqueryfordesigners.com/fixed-floating-elements/ Demo Page : http://static.jqueryfordesigners.com/demo/fixedfloat.html 回答2: You need to

Jquery simple manipulation tabs not working in jsp

烂漫一生 提交于 2020-01-14 03:47:07
问题 I was trying out jquery tabs where the user can add tabs and remove tabs.I found one suiting to my needs here: http://jqueryui.com/demos/tabs/#manipulation I tried this out in a jsp page in the starting.When I run the app it throws an exception telling: The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: /Items.jsp(34,32) #{...} is not allowed in template text org.apache.jasper.compiler.DefaultErrorHandler

JqueryUI 1.11 tabs link directly to tab while on the same page

房东的猫 提交于 2020-01-14 03:43:06
问题 None of the solutions present on Stack Overflow works for 1.11, I have tested each and every one of them. I need to be able to link from a menu to a tab on the same page using the tab id and not its position on the page. I can already do that from an external page as you can see here: http://agileprojects.ro/tabs/links.html. I also have a solution for linking inside the page but ONLY to the position of the tab (first, second, etc.). Sadly this is not a valid option as: the links are the site

Confirm Jquery UI Dialog Prompt on Enter Key

醉酒当歌 提交于 2020-01-14 03:26:26
问题 I've tried the techniques suggested in the following stack answer to no luck: Submit jQuery UI dialog on <Enter> Something must be off with my code. On login, I have a disclaimer that pops up to warn the user that the information found within the site is confidential. I would like it so that to continue, all the user has to do is hit the enter key. Here is my original code (I've included a browser check): $("#loginForm").submit(function (e) { e.preventDefault(); if ($.browser.msie) { $("

jQuery ui.combobox and asp.net web forms autopostback

雨燕双飞 提交于 2020-01-14 03:24:08
问题 I'm using the autocombox from the jQuery UI library (http://jqueryui.com/demos/autocomplete/#combobox). The combobox is replacing a standard asp.net web forms dropdownlist control with it's autopostback property set to true. Is there a way I can 'inherit' the event handler on this control or is there a way I can identify that a 'select' or 'change' event has happened in the combobox so I can fire off a postback myself? EDIT: Adding my combobox code: (function($) { $.widget("ui.combobox", {