jquery

How to move an anonymous function out

I have a $.ajax call with an error callback: error: function(result){ $('#msg').text(result.statusText).addClass('err'); } I'd like to change it to a more generic: error: myError(result) And then all by itself: function myError(theError){ $('#msg').text(theError.statusText).addClass('err'); } But firebug is telling me "result" ...

Drop Down Problems

I am trying to create a drop down list. I have it working but not fully, using this code: $(document).ready(function(){ $("#zone-bar li em").hover(function() { var hidden = $(this).parents("li").children("ul").is(":hidden"); $("#zone-bar>ul>li>ul").hide() $("#zone-bar>ul>li>a").removeClass(); if ...

how can i visible an invisible control with jquery (hide and show not work)

hi my dear friends ... How can I change the visibility of a control with jQuery? I have a control that its visible property to false...(not css) When I used show() function for it nothing happened, it seems that hide() and show() methods are for css set of a control , not visible property... Thanks for your answers, Best regards ...

Hover Event using JQuery

Hi Everyone! I am trying to get a "marker" to move when the user hover overs a certain here's my code: $(document).ready(function(){ $("#icondesc a").hover(function(){ var cls = $(this).attr("class"); $(this).siblings("p").hide(); $(this).siblings("p."+ cls + "_qu").show(); if(c...

Modal Dialog and Form Elements

I have a form that contains some fields and a recaptcha box. I have hidden the recaptcha box. The user clicks "create profile" and a modal dialog pops up with the recaptcha box. All fine. But, how do I submit that information? I am using Javascript to create the recaptcha HTML in the modal. I have a button called "Create Profile" that ...

How do I use jQuery for click event in iPhone web application

When I use jQuery for a simple click event it only works for links. Is there a way to make it work for spans etc: $("span.clicked").live("click", function(e){alert("span clicked!")}); $("a.clicked").live("click", function(e){alert("link clicked!")}); Example is here: http://ip1n.j-www.com/test/index2.html The SPAN works in Safari bu...

jquery form change

Hello! In jQuery, is there a simple way to test if ANY of a forms elements have changed? EDIT: I should have added that I only need to check on a click() event. EDIT: Sorry I really should have been more specific! Say I have a form. And I have a button with the following: $('#mybutton').click(function() { //here is where is need to...

Speed up a web service for auto complete and avoid too many method calls.

So I've got my jquery autocomplete 'working,' but its a little fidgety since I call the webservice method each time a keydown() fires so I get lots of methods hanging and sometimes to get the "auto" to work I have to type it out and backspace a bit because i'm assuming it got its return value a little slow. I've limited the query results...

jquery XML, i need .html() not .text() but not working?

I need var long to be exported as html and not text. I know I have .text() but when I use .html() it will not work. Also if I take the .text() out when declaring the variable and it will not work in IE? The reason for this is, in the XML certain words will have html tags like or and I need those to be recognized. I thought I solve...

How do you apply CSS to the editor iframe in jwysiwyg (jQuery wysiwyg)?

Hello, I'm using a slightly customized version of jwysiwyg for a website. I'm trying to change CSS values inside the textarea replacement (the iFrame where the text gets written) - but I just can't seem to figure out how. Do I have to create a new style sheet to apply to the iFrame? Specifically, I want to change the iframe's :active...

Forumotion profile customization using jQuery based on URL

The idea is have a jQuery snippet (I like Jquery...I can understand it better then regular javascript) that will detect that when it has been run on a profile with a url such as "http://customize.forum-motion.com/profile.forum?mode=viewprofile&u=1" (just as an example)...then upon detecting that it is a url of a profile...fetch data ...

jQuery > Update inline script on form submission

I am using the ChemDoodle Web Components to display molecules on a web page. Basically, I can just insert the following script in my page and it will create an HTML5 canvas element to display the molecule. <script> var transform1 = new TransformCanvas('transform1', 200, 200, true); transform1.specs.bonds_useJMOLColors = true; ...

Is there a better method for scrolling a page (with jQuery) in Safari for iPhone (scrollTop doesn't work right)

Hi there, I am working on an iPhone version of a website, and I am using jQuery .animate() with the scrollTop attribute to scroll to different sections of the page. Something like so: $('html,body').animate({ scrollTop: distance }, 300); On regular web browsers, the scrolling starts from the current window position to the desir...

getting a slide of 'data' returned by $.ajax

With $.ajax i'm getting a page dinamicly generated via PHP code, in the HTML returned I need only one object ('lwrapper' in my code). How can I grabber my object (with id='lwrapper') from 'data' returned. this is my code $.ajax({ url: ref, //the url cache: false, success: function(data){ //code ...

Making invisible table rows visible one by one

I have the following situation I have a couple of table rows within a table eg <tr><td>One</td></tr> <tr><td>Two</td></tr> <tr><td>Three</td></tr> <tr><td>Four</td></tr> <tr><td>Five</td></tr> Say all of them are invisible Then I have a button to make them visible one by one, so if row 1 is invisible and I press the button then row ...

jquery show/hide/toggle etc.

JQUERY: $("li h2").click(function() { $(this).toggleClass("active").siblings().removeClass("active"); $(this).next("div").slideToggle("fast").siblings("div").slideUp("fast"); }); HTML: <ul> <li> <h2>headingA</h2> <div>contentA</div> <h2>headingB</h2> <div>contentB</div> </li> </ul> NO...

Character Encoding Not Being Transmitted by getJSON jQuery?

I'm seeking to send this string via getJSON to my app: Academia-Gate — the Nanny State & The Professors: My Brief Email Exchange With The Co-Chair of the “Cry Wolf” Project I have this code immediately prior to the getJSON call: jQuery.ajaxSetup({ scriptCharset: "utf-8" , contentType: "application/json; charset=utf-8"}); Using ...

What are the wysiwyg editors that have proven to be reliable at large scale?

I recently heard that jWYSIWYG editor isn't a reliable editor for a large scale website. Are there other WYSIWYG editors that have proven to be reliable on a large scale? Thanks, Walker ...

Processing JSON data with jQuery - strange results needing alert()

I have this code below. I randomly ran across that it will work if I have that alert message exactly where it is. If I take it out or move it to any other spot the tabs will not appear. What exactly is that alert doing that allows the code to work and how can I make it work without the alert? $.ajax({ type: "GET", url: "../aj...

How can I make a jQuery UI 'draggable()' div draggable for touchscreen?

I have a jQuery UI draggable() that works in Firefox and Chrome. The user interface concept is basically click to create a "post-it" type item. Basically, I click or tap on div#everything (100% high and wide) that listens for clicks, and an input textarea displays. You add text, and then when you're done it saves it. You can drag this e...