jquery

"rescue in const_missing" error with Ruby 1.9.1, Rails 2.3.2, and jrails 0.4

I recently started a project where the team decided we'd like to use jQuery rather than Prototype/Scriptaculous for our javascript needs. We set our project up, and began the switch. The plugin was installed via these instructions, and all went according to plan. Shortly after, when trying to run "./script/server", we get the followin...

Sliding Panels activated by Links

I have three links. I want each link to control a separate DIV (I guess within a container DIV). So when you open the page you have DIV-1, then you can click on the link for DIV-2 or 3 and the view will slide or scroll to that DIV. How is this possible in jQuery? I've tried scrollleft to no avail. Thanks in advance, Stu ...

Hiding parent divs in Jquery

I am having a simple div structure ( see below ). All I am trying to do is when the div id "interviewer-Button" is clicked the following div's should appear and when the div id "elt" is clicked divs from id "parent0" till the end should hide. The display part works fine. However, when I try to hide, it just does NOT hide. When i click o...

jQuery error, only with Explorer

I have a custom jQuery script that works fine in all bowsers but one (Explorer 6, 7, 8?). The purpose of the code is to allow a user to add multiple form fields to their form (if the user want more than one phone number or more than one web address). It is written so that any "A" tag with a class containing "add" is bound to the jQue...

Javascript Object.Watch for all browsers?

Hey all, I was looking for an easy way to monitor an object or variable for changes, and I found Object.Watch that's supported in Mozilla browsers, but not IE. So I started searching around to see if anyone had written some sort of equivalent. About the only thing I've found has been a jQuery plugin (http://plugins.jquery.com/files/jqu...

jquery / Sliding Panel Problem only in ie7

Hi Guys, Been working with someone on this and we're both stumped. I'm using the following jquery module (web-kreation.com/demos/Sliding_login_panel_jquery/) together with a shopify store that I've built (Store Link (password: grocery). The goal is to have a running shopping cart on every page without intruding on the site's design a...

Ajax problem using MooTools/jQuery - p.onStatusChange is not a function

Hello, I get the following error in firebug in Firefox 3 with both MooTools and jQuery: "p.onStatusChange is not a function". I've noticed this error frequently in firebug since one of the latest updates of FF3. However, it has started appearing with code that hasn't been changed in some time and that was not reporting errors previous...

changing context to parent with jQuery

I've got a function I am running on a jQuery object using .each(). Except, if a certain test passes, I actually want to run the function on the parent of the node in the current iteration. However, when I try to switch contexts, I get an assignment error or endless loop. Here is the code that does not work: $(this).each(function() { ...

calling a function on one page from a link on another page

I have an html page (django) that contains several divs(each displaying different data) and one div that has navigation links. I'll call this my main page. I have an external .js file (jQuery) that reveals one display div on the main page and simultaneously hides all of the others (except the navigation div) based on which nav link is ch...

When using back button AJAX results have been lost.

So I've set up a pagination system similar to Twitter's where where 20 results are shown and the user can click a link to show the next twenty or all results. The number of results shown can be controlled by a parameter at the end of the URL however, this isn't updated with AJAX so if the user clicks on one of the results and then choose...

jQuery - toggle margin and height to zero then back again?

I have an element, its CSS 'display' is set to 'none', its height is set to 20px, and margin-top set to zero pixels. When a user clicks a button, I want my elements height and margin set to 0px. Then I want it to set 'display' to 'block' and animate its height and margin to the values as defined in the CSS - 20px - to slide and reveal i...

Space Before Ajax Response (jQuery, PHP)

I'm using jQuery to make ajax requests. The data is getting to PHP nicely, but the response isn't getting back to javascript properly. Somehow there is a space before the response. I know this because Firebug says so and my code doesn't work because the space is there. When I expect there to be a space it works fine. Any ideas as to what...

JQuery selector

Given the following unordered list, the JQuery selector $("#root #2") selects: /ul/li/ul[@id='root']/li/ul[@id='1']/li/ul[@id='2'] Whereas I would have expected it to select the shorter path: /ul/li/ul[@id='root']/li/ul[@id='2'] Anyone any ideas? <ul> <li>root <ul id="root"> <li>1 <ul id="1"> <li>2 ...

havjQuery context menu examples

Hi, I have been trying to get the Context menus running at some of the sites on the web like http://www.abeautifulsite.net and so forth but every time my menu divs show on the page and right click doesn't work. Is there an example mvc hopefully or a .net project I can download to see how it is working? Here is what I have in a View ...

My RegEx is screwing up the rest of my javascript...

OK, so I'm working with a little regular expression—it's my first time, please, be gentle—and I've run into a problem where I can set a variable with it but if I try to do anything with that variable it causes problems. Here's my script: $(document).ready(function () { var show_number; var url_param; $("a[rel=more]").live(...

[jQuery] How to extract a string from a larger string?

Using jQuery how would I find/extract the "Spartan" string if the outputted HTML page had the following.. <a href="/mytlnet/logout.php?t=e22df53bf4b5fc0a087ce48897e65ec0"> <b>Logout</b> </a> : Spartan<br> ...

jQuery.. pulling a string before current element

HTML.. <div class="row"> <div> <b>Title A</b> <a href="#">Link 1</a> <a href="#">Link 2</a> </div> Content A </div> <div class="row"> <div> <b>Title B</b> <a href="#">Link 1</a> <a href="#">Link 2</a> </div> Content B </div> <div class="row"> <div> <b>Title C</b> <a href="#">Link 1</a> <a href="#">...

Reporting syntax errors in a JSON object with jQuery and/or Javascript

What the best way to report a syntax error when I'm loading a JSON feed with jQuery? I can establish the error reporting settings like this: error: function(xhr){ alert('Request Status: ' + xhr.status + ' Status Text: ' + xhr.statusText + ' ' + xhr.responseText); } however this function doesn't fire when the URL I've called loads ...

Building a Java based stock trading application, need pointers for technologies to use

I am building an application in Java (with a jQuery frontend) that needs to talk to a third party application. it needs to update the interface every two seconds at the most. Would it be a good idea to use comets? If so, how do they fit into the picture? What other means/technologies can I use to make the application better? The appli...

jquery or javascript page re-SCAN?

Hi Guys, I have a js script on my blog page that scans the page, looks for special snippets similar to bb code and translates it into an image. For example, i search for all instances of [ ] and replace it with a box image, or all images of :) and replace it with a smiley. I also have a live preview script for my comments. My problem is...