jquery

Using jQuery on dynamically added content

Hello, I am newbie to jQuery and javascript. In my application I have a list of users. When a particular user is clicked from the list, a div element is replaced with details about the user dynamically. When another user is clicked, again I replace the same div element with this user details. So at a time only one user details can be see...

Changing Input Background Color on Google Custom Search

Although this seems like a simple task, I need to change the background color of an GOogle Custom Search input field. You can view the page here Currently, the input field is white, and I need to change it to #4e4e4e. The problem is that I cannot seem to find the correct CSS selector to set the background color. It looks like the google...

Form validation with Ajax and PHP - return a variable from PHP to use in javascript function

I'm using Ajax via jQuery for the first time ever. I have an html input and when a user clicks it and types something and then the focus blurs, i'm using jquery to call a php script to validate the user's input. I'm trying to figure out how to take the variable in PHP and compare it in jQuery. Please give me any advise Right now when ...

GUI items and elements in Javascript

How do i make boxes similar to theses? I would like a X on the top right. Text on the left of it and the text below the image where the black area is. When i click on X it will remove these and the box on the right moves over and takes it place. How might i create this using jquery? is there some kind of GUI and container i could use to ...

all children selector in jquery?

simplified, i've got following code: <a id="123" href="#"><span>click</span><span>me</span></a> when i click on 'click' and 'me' it doesnt seem to work with following jquery selector: $("a").click... maybe its because i click on the children? how could i write the selector so it maps to all children in 'a'? ...

Find input fields in current table row with class

Hi! I am making a book shop and want to add a fancy jQuery order form. The point is that the user shall choose the quantity of a book with a minus and plus button and then let JavaScript calculate a total sum for that book. I have a markup as follows: <tr> <td><p>Book title</p></td> <td><p><a href="#" class="bookDecrement">-...

Jquery next selector next() question

+----------------------------------------------------------------------+ | this is div .content | | | | +----------------+ | | | .left_content | ...

XMLHttpRequest error 0 proper management (retry the request)

When XMLHttpRequest gets error 0 it means there is no connection and most of the times you just want to retry in some time. Is there a simple way to transparently retry the XMLHttpRequest notifying the user the connection is lost (just like gmail does)? (I am using jQuery) ...

Pulling out HTML with JQuery

I have the following structure in my document: <div id="clientList> <a href=whatever.php" att="something">Text</a> <a href=whatever.php" att="something">Text</a> </div> Say I want to get all of the links between the div out, how would I do this? I tried the following: $('#clientList').children("a").each(function() { var x = $(this)....

Javascript window.location search for "#" never returns true

I'm trying to set up a redirector so that when my AJAX functions change the hash part of the URI, the link is still directly accessible should it be copied and pasted. My current function is below; however, it always returns false! //If a hash is found, redirect it var current_uri = String(window.location); if (current_uri...

Integrate MarkItUp Rich Text Editor Preview with ASP.NET MVC App

Update I have have this up and working on my site. http://rsolberg.com/ViewBlog/21 I'm currently testing out the MarkItUp rich text editor in a MVC app, and everything is working great with the exception of the preview. In the settings (set.js), there is a previewParserPath property ("path to your BBCode parser"). I'm not exactly s...

Maintaining an Adobe Air Desktop Application with an XML Document

i am going to be utilizing a flash/jquery powered gallery on a webpage that is maintained and updated with an xml document. the xml data is used to add and sort images into a grid of small thumbnail images. i will customize this component so that when the user rolls over a thumbnail it will trigger jquery to replace a div using hide/show...

Opening iframe is blank before clicking a menu item.

I have an iframe on a web page that is on the opening page but the iframe is blank until a menu is clicked. Is there a way to show some "welcoming text" on the iframe on its initial load but not show it any other time? I think jquery may do this, not sure. Web page in question is this: http://transeeq.com/health/bq16.html ...

Assign click event inside click event

Inside of an onclick event, I'm binding another onclick event. But when I initiate the first event, the second always executes: var MiniMenu = { show : function(menu_id, element){ // this doesn't have any thing to do with the problem - I think position = $(element).offset(); $('#' + menu_id).css({ ...

how to change images on mouseover and leave

here is my site: http://iaddesign.com/beta/portfolio.php i tried this: $("#portfolio li img").hover( function() { $(this).attr("src", function() { return "images/" + this.alt + ".png"; }), $(this).attr("src", function() { return "images/" + this.alt + "-over.png"; }); but what it does is not show the image (for some r...

Evaluating Returned Data after AJAX call with JQuery/CodeIgniter

EDIT: I found the problem with my evaluation not working. All the text being returned from my codeIgniter functions has a space before it, so while I saw "success" it was actually " success". I don't know why it is, but I can certainly work with that. As for the next step - opening a new view - Donny's answer was perfect! I am usin...

How to embed Javascript widget that depends on jQuery into an unknown environment

I'm developing a javascript widget that depends on jQuery. The widget may or may not be loaded onto a page that already has jQuery loaded. There are many problems that come up in this case... If the web page does not have jQuery, I must load my own jQuery. There seems to be a delicate timing issue when doing this, however. For exam...

CSS Alternative To This CSS-jQuery Code?

I have two columns side by side that are different colors. The background has a unique color as well. The right column contains text that will expand to an unknown height. The other column contains little to nothing. <div id="container"> <div id="leftColumn"> <p>Only one small paragraph here</p> </div> <div id="r...

Is Graceful degradation possible for everything? for every javascript and javascript frameworks functionality?

Is Graceful degradation possible for everything? for every javascript and javascript frameworks functionality? ...

How can I do something like this photo gallery in jQuery?

The preview of the new accuweather.com has a really cool photo gallery. Anyone have ideas or specific tutorials on how to mimic it? Here's a link to what I want: http://www.weatherforyourlife.com/ ...