jquery

jquery loop to create elements with retained values

Dear all, I recently asked a question about creating elements with jquery. Specifically I needed input boxes created/deleted depending on the value of a particular select box. This was answered quickly with a very nice solution as follows: $('select').change(function() { var num = parseInt($(this).val(), 10); var container = ...

jQuery + Dialog Form Validation

I have a jQuery Dialog form and on submit I'm trying to validate the fields. I'm using jQuery Validation plugin to validate. In this I'm facing an issue, the validate function is not being called. I'm posting some snippet of my code: $("#register-dialog-form").dialog({ autoOpen: false, height: 350, width: 450, modal: tr...

jQuery/AJAX type-ahead/auto-complete

I have read several articles/questions/forums discussing the best auto-complete plugin for jQuery. After trying several good ones, I've realized a flaw in most. If you are looking up countries and type 'In', a couple of countries show up. If you continue typing I-n-d-i-a, this results in 5 AJAX calls (see http://www.freeimagehosting.ne...

How build a global function to have the recent background-Positions for continue animation after changing a page

Try to find a global function, to get and to put the backgroundPosition-values, but I feel a bit confused. Here is the function: function global_backgroundPosition_Menu(num){ $('#Navigation_1') .css({ backgroundPosition: num + "px 0" }) } /////////////////// An here I want to ca...

Google Maps: Simple app not working on IE

We have a simple Google Maps traffic application up at: http://www.avonandsomerset.police.uk/newsroom/traffic/ For some reason it's recently stopped working in IE correctly. At this point in time it was using V2 of the API, so I've just upgraded it to use V3 - but it still won't work in IE. It works fine in Chrome & Firefox. But in all...

How to do callback + update div tag in javascript

Hi all, I have an ASP.NET MVC application with pages where the content is loaded into divs from client via javascript/jquery/json. The loaded content contains a-tags with references to a function that updates server side vaules, then redirects to reload of entire page even though . I wish to replace the a-tags with 'something' to still...

FullCalendar lazyFetching

I had enabled lazyFetching option with true/false. and click on any button of calendar then calendar sending multiple ajax calls to get data. Here is my configuration $('#calendar').fullCalendar({ header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay' }, editable: false, disableDragging:true, co...

How to drop larger object on a smaller one when near edge of the containment?

I'm trying to drop a large box onto a smaller box. The large box seems to be 'over' the box only when its very center is inside the smaller box. Can I change the part of the big box which needs to be over the smaller one? Why? Because it all works fine until I add a containment. When the small box is near the edge of the containment t...

jQuery tooltips on a dynamically generated page.

Him I'm trying to add a jQuery tooltip to a dynamically generated list, the text I want to display the tooltip on is in a table, so my CSS tooltip doesn't work: CSS tooltip. I tried to add this jQuery tooltip to the page, it works on my local test page, but I think the problem has something to do with uniqur ids, and I'm not sure how t...

Get Value from thick box control

I have hidden field on thick box, when I close thick I need to get the value of my hidden field, when close thick box this method calls function tb_remove(parent_func_callback) { parent.document.getElementById('hdf').value// I need value of hidden field here please tell me how can I get hidden field value that is on thick box? e.g ...

Drag and drop not working while using JQuery UI dialog

Hi Guys ! I m using jquery ui.core.js with version 1.7.2 and jquery-1.4.2.js . I got the issue saying "proto.plugins"(query ui.core.js for draggable module) is undefined ,hence i am not able to perform the drag option.My Code is given below. $("#linkfortag").click(function(){ var $dialog=$("<div id='testing'></div>").dialog...

JQuery Ajax Help

Hi. I have a page on my site that currently loads html via ajax. The JQuery is: $(document).ready(function() { $('.projects a').click(function(event) { $('#work').load(this.href); event.preventDefault(); }); }); and the html is: <div class="projects"> <a href="work/link.html" title="blah" id="blah">blah</a> <a href=...

spyr validation text with jquery serialize()

Code like this : <form> <ol> <li> <fieldset> <legend>test</legend> <ol> <li> <label for="qwerty">qwerty</label> <span id="sprytextfield1"> <input name="qwerty" type="text" id="qwerty" /> <span class="textfieldRequiredMsg">error no qwerty input</span></sp...

How to make simple example to explain jQuery.noConflict() with prototype?

How to make simple working (only if i remove/comment prototype) example to explain jQuery.noConflict() with prototype? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-...

jQuery, how do I check a time range?

Hi all, I want to display 3 different background images according to the time of the day: one for morning from 4am to 12am one for afternoon from 12am to 6pm and one for the night from 6pm to 4pm. Im using the json server to get the time zone etc... I tried this but doesn't work properly: $(document).ready(function(){ var timezon...

How to pass 2 variables to a php document with jquery

Hello I have two text inputs which get their values from a datepicker. What I want to do is when user selects the two dates script pass these two values to a php document in which I make some checks and I return some html. Here is what I'm trying to do: (#to and $from are 2 input texts) $(document).ready(dateinput_change); function...

JQuery remove image src prefix

Hi. I have a bunch of images on a page that are contained within a div with a class of content-block like this: <div class="content-block"> <img src="../images/path/path/image.jpg" alt="blah" title="blah" /> <img src="../images/path/path/image.jpg" alt="blah" title="blah" /> <img src="../images/path/path/image.jpg" alt="blah...

Number nested ordered lists in HTML

Hi I have a nested ordered list. <ol> <li>first</li> <li>second <ol> <li>second nested first element</li> <li>second nested secondelement</li> <li>second nested thirdelement</li> </ol> </li> <li>third</li> <li>fourth</li> </ol> Currently the nested elements start back from 1 again, e.g. first second secon...

Attaching multiple Click Events to one object in jquery

I have links in my webpage which get several types of functions linked by jquery. First, they get the standard behaviour of marking which one is the active link: $('.buttonlist li a').bind('click', function() { var li = $(this).parent(); li.siblings('.aktiv').removeClass('aktiv'); li.addClass('aktiv'); }...

Defining Form Input with Dialog

Hi. I want my php application to allow the user to select a file from their computer. I then want to store the file's path, but I don't want to upload the file. With the <input type="file" />, the file is uploaded, which would take too long. Is there a way to do this? Maybe if I change the input's type to text with jquery right before ...