jquery

jQuery modal plus drag and drop

I am using jQuery to build a magentic refrigerator game where you create sentences from the word bank. I have a list of 90+ words. I would like for the user to be able to open the word bank in a draggable modal and then drag each word from the modal to the main content div. The issue I am having is that I can only keep the words insid...

calling php file from jquery at specific interval

i have following variables in jquery var uemail="[email protected],[email protected],[email protected]"; var subj="test message"; var text="<b>This is Email Body Text</b>"; i have one PHP file named "email.php" to send email <?php $email =$_GET['email']; $subject =$_GET['subj']; $message = $_GET['text'];; if(mail($ema...

Parsing natural language date/time values into formatted date/time strings

Hi, I'm trying to let users type in date and time values into an input field. Some examples may include: Tomorrow at 3pm Now Today at 1pm Next tuesday 4pm How would I go about parsing such readable text into date/time strings? E.g. dd/mm/yyyy hh:mm Can it be done client-side using jquery or must it be done ajax through php? Thank...

Problem with jQuery AJAX requests: relative vs. absolute urls

hey there, I'm having a hard time getting my AJAX requests to work on a staging server. It all worked fine on my development machine, but as soon as I uploaded it, all my AJAX requests stopped working. I found out that, if I change the relative urls (eg. "index.php") to absolute urls ("http://mydomain.com/index.php") the requests work a...

jQuery slideshow in the background - Wrong CSS maybe?

Hello. I have this very simple html with a "wrapper" div and other two elements inside it. <div id="wrapper"> <div id="logo"> <img src="images/myLogo.jpg" /> </div> <ul id="menu"> <li class="class_link1"><a href="#">Menu item 1</a></li> <li class="class_link2"><a href="#">Menu item 2</a></li> <li class="...

Using jQuery delay() with separate elements

I want to fake a simple animation on page load by sequentially revealing several pngs, each appearing instantly but with unique, precisely timed delay before the next one. Using the latest version of jQuery (1.4.2 at writing), which provides a delay method. My first (braindead) impulse was: $('#image1').show('fast').delay(800); $('#imag...

Why can't I get TinyMCE to work?

My URL is: http://www.metroflatsmiami.com/listing/add.html Any help? ...

A link to redirect within a facebox (does not break out)

How can make a link within a facebox window that redirects it to another page without breaking out? I tried using an iframe which worked nicely... except the initial content I want to display in the facebox is a simple message and a link. I then want the link to redirect to a page if clicked. As iframes require a src there is no where ...

Does removing elements from the DOM affect their event handlers?

If I remove an element from the DOM which has event handlers attached, and subsequently add an element with the same ID somewhere, will the new element have handlers? ...

jQuery detect keystrokes and set variables accordingly

I have created a rudimentary EasterEgg within my code to activate when the following keystrokes are made (not simultaneously) Enter + c + o + l + o + r + s with the following code: isEnter = 0; isC = 0; isO = 0; isL = 0; isR = 0; isS = 0; $(window).keydown(function(e){ if(e.which==13) isEnter = 1; if(e.which==67) isC = 1; if(e.which...

Jquery ajax method always fires error: callback instead of success:

Hi I am having a problem when using the ajax function in jquery. The ajax call seems to be running fine, i.e. the code that is returning an xmldocument runs without errors. Here is that code. Jquery code: function LoadWeekDays(){ var xmlDoc=new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async="false"; xmlDoc.loadXML("<data...

jQuery subscription link toggle

I have a subscription link on a page that the logged in users can use. Toggling the link on the page is no issue, as I can do a .post and echo out what the PHP returns if ($subscription == true) { echo 'Subscribed'; } else { echo 'Click to subscribe'; } However, what bugs me is that I have to write that same piece of code in my t...

Change href file but not query string with jQuery

I'd like users with JavaScript enabled to see page results.php. Users with JavaScript disabled should see results_d.php. To do this I'm initially displaying my links with results_d.php. Then by using JavaScript to change the destination in the links, only the users with JavaScript enabled will see the rich content. There are a few ques...

Order number of highlight element

Hello everyone, i need to get number of order highlighted element (by javascript, jquery): <li>A</li> <li>B</li> <li class="highlight">C</li> <li>D</li> so, in this case i want to get number 3 into my variable. Thanks ...

JQuery Dynamic Combobox

Hello, Why within JQuery, the combobox add method doesn't seem to be recognized as with traditional html combobox here: http://viralpatel.net/blogs/demo/dynamic-combobox-listbox-dropdown-in-javascript.html ...

Equal Height not working in Safari (jQuery)

$.fn.equalHeight = function () { var height = 0, reset = $.browser.msie ? "1%" : "auto"; return this.css("height", reset).each(function () { height = Math.max(height, this.offsetHeight); }).css("height", height).each(function () { var h = this.offsetHeight; if (h > height) { $(this)...

jquery validate: adding a required rule with custom message based on wether a different form field has a value.

Hello Everyone, I know this seems like a repeat question, but i've read all the others and they arn't quite the same :( I've got some drop downs, and if they have something other then an option with a value of "0" selected then I want the coresponding Expiry Date field to be required. I tried putting the rule in the class of the...

How can I delay a ASP.NET AutoPostBack so JavaScript fires first?

I've got an odd situation with a text box and an autocomplete setup on my page. I'm using a JQuery based autocomplete on a text box that has AutoPostBack="True". This works perfect if I use the keyboard to select an autocomplete item, which then fires Jquery to fill in the text box, and then when I tab out of the box the AutoPostBack fir...

Can PHP be inserted into a javascript call in my header?

I have a wordpress theme that I like to duplicate. To make things easier on myself I'm trying to use the bloginfo function to call my jquery file..like this: <script type="text/javascript" src="<?php echo bloginfo("template_url"); ?>/js/jquery-1.4.2.min.js"></script> I just can't get it to work. When I check my source file it looks ...

Change the width of images with same class uniformly using jQuery?

I have multiple images that have the same class attribute and I want to resize all the images uniformly even though they all have different original widths - how can I do this using jQuery? <img id=img1 class="ResizeMe" src="img1.gif" width="100" height="100" /><br /> <img id=img2 class="ResizeMe" src="img2.gif" width="200" height="200...