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...
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...
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...
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...
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 ...
How can I do that? :D
...
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"></script>
<script type="text/javascript">
function initialize() {
var latlng = new google.maps.LatLng(57.0442, 9.9116);
var sett...
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...
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...
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...
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...
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, ...
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...
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 ...
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
...
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...
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)
...
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
});
});
...
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?
...
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');
}...