jquery-ui

JQuery datepicker not working

荒凉一梦 提交于 2020-01-22 14:03:27
问题 Good day! I am trying to use jquery for the first time. And i cannot make it work. My code is as follows: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <link rel="stylesheet" type="text/css" href="style.css" media="screen" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> </head> <body>

JQuery datepicker not working

风流意气都作罢 提交于 2020-01-22 14:01:24
问题 Good day! I am trying to use jquery for the first time. And i cannot make it work. My code is as follows: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <link rel="stylesheet" type="text/css" href="style.css" media="screen" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> </head> <body>

jqGrid: how to change cell padding

眉间皱痕 提交于 2020-01-22 12:38:46
问题 I'm using jqGrid3.6.5 on google hosted jQueryUI1.8.2 and jQuery1.4.2 I want to change the cell padding of a jqGrid. For testing purposes I want to set it to 10px all around each cell. The only option I've come across while googling is the following: add padding with CSS. eg. #grid-id td, #grid-id th { padding:10px; } set cellLayout option to 21 (paddingleft + paddingright + borderleft) When I have no set width on any of the columns in my colModel, this works like expected. Though when I

Building an Image Editor with HTML 5 and Canvas

爷,独闯天下 提交于 2020-01-22 05:06:06
问题 I wanted to build a product customizer similar to http://www.getuncommon.com. But instead of Flash, I will utilize HTML5 canvas and Javascript. Is there a library which I can use to create and achieve similar editor/product customizer as Uncommon? I did look at jQuery UI but it is seem more focused on interface than creating my own editor. 回答1: I did something similar to this a while ago. I used JQuery and Raphael JS. Raphael uses VML in Internet Explorer and SVG and Canvas in other browsers

jquery datepicker on esc key event

不羁岁月 提交于 2020-01-21 19:14:52
问题 I'm trying to put a date value in the input box for the date picker when the user click on the key ESC (e.keyCode == 27) once he as open the datepicker . My test case: 1) Click on the input box, the date picker show up; 2) The user decide to cancel the selection by clicking on the esc key. 3) The following date should be then put as default (01/01/2011) in the input box since he has not selected any date. Please fork my Fiddle 回答1: $("#input").keyup(function(e) { if (e.keyCode == 27) { $("

How make jquery-ui autocomplete get out iframe?

Deadly 提交于 2020-01-21 08:29:12
问题 Is it possible to make the suggestions of autocomplete (jQueryUI) get out one iframe, having the same behaviour of "select" element? I make one example: http://jsbin.com/ehidef/1 回答1: As a matter of fact, it can be done, though some styling will be mandatory. jQueryUI accepts an element to append the options to, and you can pass the parent window as that element. An example: main window: <html> <head></head> <body> <iframe src="iframe.html"></iframe> </body> </html> iframe.html <html> <head>

Can I move a Flash object within the DOM without it reloading?

只愿长相守 提交于 2020-01-20 04:02:04
问题 I'm trying to use the scale effect from the jQuery UI library on a wrapper element that contains a Flash object. The problem I'm encountering is that the content of my wrapper is automatically moved into another wrapper ( .ui-effects-wrapper ), and when this happens the Flash object reloads. Of course, the specific problem here has to do with the tactic employed by jQuery UI — but generally, is it possible to move a Flash object within the DOM without it reloading? 回答1: I only know how this

jQuery - how to alter Datepicker settings after it has been initialized

若如初见. 提交于 2020-01-19 05:43:11
问题 I would like to bind to initialized datepicker "onSelect" function. I've been trying hard to find a solution on the web, but was unsuccessful. Anyone can tell me how to do it? 回答1: You can simply use the setter $('#datepicker').datepicker(); $('#datepicker').datepicker("option", "onSelect", function(){alert('hi')}); fiddle here http://jsfiddle.net/nhmsZ/ 回答2: I found the above solutions caused problems in my case. Setting onSelect after the datepicker has already been initialised seems to

Check if date is in the past Javascript

情到浓时终转凉″ 提交于 2020-01-18 20:46:08
问题 All, I'm using the jQuery UI for the date picker. I'm trying to check with javascript though that the date the user has entered is in the past. Here is my form code: <input type="text" id="datepicker" name="event_date" class="datepicker"> Then how would I check this with Javascript to make sure it isn't a date in the past? Thanks 回答1: $('#datepicker').datepicker().change(evt => { var selectedDate = $('#datepicker').datepicker('getDate'); var now = new Date(); now.setHours(0,0,0,0); if

Find day difference between two dates (excluding weekend days)

风格不统一 提交于 2020-01-18 04:43:29
问题 Hi i am using jquery-ui datepicker to select date and date.js to find difference between 2 dates. Right now the problem is I want to exclude weekend days from calculation (saturday and sunday). How should i do that? For example the user select start date (13/8/2010) and end date (16/8/2010). Since 14/8/2010 and 15/8/2010 is in week days, instead of 4 days total, i want it to be only 2 days. This is the code im using right now: <script type="text/javascript"> $("#startdate, #enddate").change