jquery

jQuery formular onEnter

I have a form with two input fields, one text and one send button. I want to submit via jQuery .ajax() without reloading the document. It works as long as the button is clicked, but not when you press return/enter, then it submits without ajax methodology. I tried onEnter() or onSubmit(), but that didn't work either. These are the code ...

Mark selected days in jQuery UI datepicker

I'm using jQuery UI's datepicker (http://docs.jquery.com/UI/Datepicker). It sounds like it should be possible to mark certain days by providing a beforeShowDay function (http://docs.jquery.com/UI/Datepicker#event-beforeShowDay). But I can't get the CSS right for this. I'd like to make the background green for some days. This is the Jav...

jQuery Lightbox Not working in IE7/6

We are using a heavily modded version of the jquery lightbox plugin to create a lightbox with a gallery on the side. However, when I do $('.popup').lightBox({fixedNavigation:true}); IE 7/6 gives me an error on that line. This works on every other browser. Now of course, being IE 7 and 6, theres no actual error description, so I'm not ...

Single text field for database query

I need to be able to enter any the following types of information into into a single text field. customer name (ie first and last name). customer phone number. (including area code) customer email address. customer service ticket number. customer product serial number. How it works so far is that I have 5 different PHP files on...

Get DOM elements inside a rectangle area of a page

Given two points on a webpage and a set of DOM elements, how to find out the subset of those DOM elements that sit inside the rectangle area defined by the two points? I am working on a web-based gallery, in which every photo is wrapped in a li tag. When a user drag out a rectangle area with mouse, all li elements inside the rectangle a...

Underline words on mouseover after X seconds

What I'm trying to do is: when you mouse over any word in a body of text say for two seconds, it will become underlined. And if you click it, it will stay underlined until you click anywhere else or you click it one more time. Any suggestions? ...

jQuery: adjusting width+height later in fancyBox

So i have this fancybox with these configurations: $("a#uploadImage").fancybox({ 'titleShow' : false, 'width': 560, 'height': 120, 'autoDimensions': false, 'overlayOpacity': 0.6 }); Now i wish to expand the height with 230 and the width with 7...

Need help with creating DOM elements on the fly with jQuery: jQuery(html, props) function

I'm trying to construct the following div element using jQuery: <div> <p>Hello</p> <p>Stack Overflow</p> </div> I added the first paragraph like this: $('<div/>', {html: $('<p/>', {text: "Hello"})}) but I don't know how could I add the second paragraph. Please help. ...

while requesting / after click block the button or something?

I have this upload then you can crop your image, but if you press twice quickly then it uploads 2 and it all gets crazy. How can i block the button RIGHT after it starts sending request, and where should i place it? (in jquery ajax) ...

jquery error "Invalid property value."

EDIT: This error happens because in IE6 and IE7 these attributes are required for a textarea element. Code: $(document).ready(function () { var ASP_txtNotes = 'ctl00_cphBody_txtNotes'; $("#" + ASP_txtNotes).removeAttr("cols"); // <-- Error here } Error: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; ...

jQuery subtracting successive table cells

I'm trying to determine how to calculate the difference between successive table cells in jQuery. I have a table that looks like this. <table id ="tbl"> <tr> <td>5</td> <td>12</td> <td>15</td> <td>17</td> </tr> <tr> <td>3</td> <td>6</td> <td>12</td> <td>13</td> </tr> </table> I'd like to subtra...

Center Form Dynamically Add Elements Remain Center?

I have a basic HTML form that I am centering. I am using jQuery plugin to dynamically validate that the fields are required. When it adds the "Field is required" message after the text box, it causes the form/table to shift due to the fact that it is in a table. This makes sense. The question I have is what is the best way to keep th...

How to pop image out of a div a little

Hi All , I have images in a row , I want to popout image a alit from the div as it moving and coming out. When we mouseover it should move a little bit. May I know how to do this? ...

jQuery Find Width of Block Element

Is there an easy way to determine the width of a block element if it were to be inline? I can't make the elements inline so I need some way to determine how wide it should be and then modify the width. ...

How To (Effectively) use jQuery to Match the Value of an Input with a Database?

I've been working on a PHP project of mine, and I am attempting to add a feature that tells the user whether or not the username they entered in a register form is already taken as they update the input. When starting this, I thought I knew how to code this- but I ran into some problems along the way. When I post the data to my PHP scri...

Jquery data from ajax call breaks design

Im using jquery to make an ajax call to a php file. That php file spits back html for display. The problem is when it spits back the display, which includes html code for table cells, the design is broken. The cells dont line up, in fact all the table cells become one big row. Here is the html on the page that is making the ajax call: ...

how to do partial page update with jquery

I have navigation menu when clicked only a content div in the page should be updated from html contect files that in the server withouod doing a full page refresh, how can i achieve this using jquery? ...

Jquery selectable only with shortcut

I want to let the user select when the shift key is held. $("#div").selectable({ start: function(st) { $(window).keydown(function(e){ if(!e.shiftKey){ st.stopPropagation(); } }); }); no? ...

Horizontal nav menu with jQuery css sprite rollover

I was thinking of having a unique setup for my left navigation on my Mario themed website: OK, so for each link, I would have the text like "Action Figures" for example in a certain font. Give a little room, and then insert a sprite of a certain Mario character, Mario would go next to "Action Figures", Luigi next to "Board Games", so o...

how to clone content of a div to another div

HI I want to copy the content of a selected div to another div with jquery clone. but I dont want to append it anywhere what I mean is when we make a clone of a div with jquery (correct me if i am wrong) we have to set its position and it will dynamically create a new division which is displayed. but I want to get the content of a se...