jquery

Contents of a Div formatting differently when built through jQuery

I have the following DOM structure: <div id="module-main"> <div id="module-crumbs"> <h4>Hello</h4> </div> </div> When I place that in a document and view it, it works fine. But if I build it from jQuery like so: $('#module-main').append($('<div id=\"module-crumbs\" />')); $('#module-crumbs').append($('<h4/>').html('Hello')); In...

jQuery - find 1st element with a specific class from above, but not before another element

Hi! The HTML looks something like this: <li class="divider"> <div> ...(maybe more divs)... <div class="content"> ...(maybe more divs)... <a href="#" class="link">LINK</a> ... how can I select the .content DIV, from within a jQuery function hooked on the link? Note that I have multiple lists like t...

jQuery already submitted vs. being submitted

Hey guys, I'm working on a jQuery function that forwards form data to page without interfering with the normal submission. I can do it without any issues as long as I capture the submit using .submit(), but I would have to run my own validation on the data because it operates independently of the regular submission. Is there a way for j...

Jquery autocomplete :: clear cache

I am using Jquery autocomplet for two fields, Country and state. I want the states list according to country value and I am getting this too. My problem is that state auto complete also show the result of previous country seach. I know this is because jquery cache the result. Some one please guide me how to solve this My code is below...

Table Row Still taking up Space after calling JQuery Remove on it

Hi Everyone, I'm having a strange problem and haven't been able to find anything about it anywhere. I am using the JQuery remove method on a table row and while it is removing it, it is still leaving a small amount of space where the row used to be. It's hardly even noticeable if I only remove a row or two, but when I remove more you ...

jQuery - recreate slideDown() effect using the animation() function ?

How can I do that? :D ...

Google Maps : add infowindow to every marker

Hello, I am new to Google Maps. I have found this code. Here is DEMO : <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"&gt;&lt;/script&gt; <script type="text/javascript"> function initialize() { var latlng = new google.maps.LatLng(57.0442, 9.9116); var sett...

HTTP POST Request using a server proxy in PHP

I'm trying to do an HTTP post request. My server is running a php script with code here <? $siteurl = $_REQUEST['address']; $postdata = ''; $fakeua = 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/5.0)'; $ch = curl_init($siteurl); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata); curl_seto...

Styling Select box with jQuery in WordPress

Just trying to style a select box on a WordPress project with jQuery using this plugin. http://plugins.jquery.com/project/stylish-select-box/ jQuery(document).ready(function(){ // select box styles jQuery('#genre-dropdown').sSelect(); }); When I call it on the select box it displays two copies of .newListSelected (the stylab...

Dynamic Click via JavaScript (or jQuery) on a Checkbox

I know I can change the attribute checked to checked, but i need to actually "click" the checkbox to fire off a live() (jQuery) click event. I know I can also make it a function, but this would just be a lot cleaner and less code, if possible. Oh, and FYI: $('.modal-form [name='+json[0].owners[x].name+']').click(); Doesn't work. It c...

How do I duplicate the presentation functionality for HTML5Rocks.com?

When you go to http://slides.html5rocks.com/ you can see the entire presentation (with a previous and next slide peeking from the sides - all while it is relative to the screen size of the user). How do I do that with jQuery + HTML5? I just want to have a bunch of images (think a photo gallery) that can be cycled through like that. When...

jquery $.get(...) one at a time

i have a page with many actions on it, which triggers with $.get, but i want to run one at a time, rather then all triggering at once, that is lots of load time.. so what is the solution for me on this? well before you give answer.. i dont want to trigger based on time, i want to trigger after each request is completely done from ajax, ...

Using jQuery to cycle through 4 banner images contained in 1 sprite

I have 4 banner images, and I want to cycle through them using a basic fade animation in an infinite loop. I found this jQuery plugin: http://jquery.malsup.com/cycle/ and have tried to do it this way: HTML: <div id="banner"> <div id="home-banner-1"></div> <div id="home-banner-2"></div> <div id="home-banner-3"></div> <di...

Normalising/Validating user's 'City' input during registration

Hello, My problem concerns validating/normalising a user's input for the combination of Country and 'City' during registration. Ideally, I want functionality similar to the OkCupid (http://www.okcupid.com/signup) registration page where this question is asked. Loss of focus on the City input field validates the input somehow, and it is ...

jQuery Perform action if checkbox "A" is the only one checked

Can you run a check to see if a checkbox is the only value checked against a group? $("#ID").change(function() { if ($("#checkboxA").is(":checked") && NOTHING ELSE IS CHECKED) { //do somethinge } else { //do something else } }); I need help with the "&& NOTHING ELSE IS CHECKED" and Im still not sure this would be a change function ...

jQuery first parent containing all children

How would I got about selecting the first parent of a set of elements that contains ALL of those elements? For example: <body> <dl> <dt>Items:</dt> <dd> <ul> <li>Item 1<div class="item-info">...</div></li> <li>Item 2<div class="item-info">...</div></li> <li>Item 3<div class="item-info">...</div></li> </ul> </dd...

Web Workers and Sparklines

I know that Web Workers don't have access to the DOM, but I was wondering if there was any way they could render a Sparkline graph behind the scenes and pass it back. If not, is there ANY way I could use Web Workers to speed up the processing of around a million sparklines? I'm trying to improve performance (see this question) ...

how to combined between "easy silder" & "prety photo" jquery plugins?

i have a problem put 2 jquery scripts in one page. only one is working until i remove the second script the other working. here is the code of easy slider <script type="text/javascript" src="js/jquery.js"></script> $(document).ready(function(){ $("#slider").easySlider({ auto: true, continuous: true }); }); ...

jQuery.noConflict() breaks plugin

I use both Prototype and jQuery in my rails app. To resolve the $ conflict I do the following: <script type="text/javascript"> var $j = jQuery.noConflict(); </script> This works mostly fine, but I am trying to use a plugin that does not like it and throws a $ is not a function type error. What can I do to fix it? ...

margin issue on IE7 with jQuery hover effect on absolute position

Having the absolute position on .nav li p creates extra margin when hovering an image only on IE7, but without the absolute position, images flicker. Is there another option than the absolute positioning? This is what I have: $('ul.nav li').hover(function() { $(this).prepend('<p></p>') .find('p') .fadeIn('fast'); }...