I have a div that is floating left and the other floating right. I want to check if the div that is floating right has children element; if the it don't have any visible element, I want applied and new class to the left div. See below:
<div id="leftContent" class="left ">
<table></table>
</div>
<div id="rightContent" class="conte...
In trying to convert some of my JS to cross-browser compatibility, I've come across strange behaviour where I'm unable pinpoint the problem.
I want to convert window.event.x (IE specific) using jQuery, so my code looks as follows:
function someFunction(e){
var ev = $.event.fix(e);
alert(ev.pageX);
}
This returns the correct val...
The goal of the following bit of code is to toggle a group of radio buttons named "knowsnumberofpeople". Unfortunately, after the first message box shows up and the radio buttons change correctly, jQuery goes back and toggles everything to the original state.
Why does jQuery go back on previous items in the collection?
Code:
<script ...
I'm a developer ... not so much "the" UI guru type. I can get by with my photoshop skills to some extent but often find myself underestimating my time here and thinking that I'm probably not as efficient as I could be in this respect.
Anyhow, I know I can't be the only developer on earth being tasked also with the design as well so ......
I added a drop down to a PHP contact form which pops up in a jquery, it seems to work just fine with Firefox but does not submit when using IE.
URL: http://site.ctuchicago.com
...
Suppose I have some jQuery code that attaches an event handler to all elements with class "myclass". For example:
$(function(){
$(".myclass").click( function() {
// do something
});
});
And my html might be as follows:
<a class="myclass" href="#">test1</a>
<a class="myclass" href="#">test2</a>
<a class="myclass" href=...
Hi guys!
I need replace slide effect to fade-out/fade-in effect on the prev and next slide functions:
function animate(dir,clicked){
u = true;
switch(dir){
case 'next':
t = t+1;
m = (-(t*w-w));
current(t);
if(o.autoHeight){autoHeight(t);}
if(s<3){
...
I have a sidebar that I want to behave like it's frozen on the right side of the pane even when the scroll bar moves the down to see more content. I gave up on it being perfectly fixed and handled it by the sidebar scrolling down with the page using jQuery. Currently this is how I'm handling this.
<script type="text/javascript">
$(windo...
Hello all,
I am learning JQuery, and I have ran into an odd issue. I made a slideshow, and it works in IE, Firefox 3.0 and Firefox 3.5, but the initial image doesn't work in Chrome.
The script just cycles through a list of images and resizes the divs (image, caption) based on the size of the viewing window. If I move the $(document...
I'm using jquery and what I'm doing is binding the toggle method to a number of buttons on a webpage. It looks something like this
$('.button').toggle(function(){
// first function
}, function(){
// second function
});
However, there are animation in both of those functions. So a user can click the button while the first or second...
I'm rather new to jQuery and I'm trying to make a cool little menu effect where when the user hovers over a element (#nav li) it will animate to a larger width, which will reveal the full background image. Each of the menu items has a ID to explicitly set a width (since they are all different in size), so #nav1 might be 80px whereas #nav...
I've been working on a website for quite some time that makes heavy use of ASP.Net 3.5 and it's many ajax features. I particularly use the ScriptManager to register WebServices (.asmx) a lot. I also use their $get('idnamehere') method all over the place. I'm not really using any Ajax.Net pre built tools (like from the Toolkit) everything...
I'm working on a project that makes heavy use of jQuery tabs and Ajax. Loading data into the tabs is simplicity itself, but the data in the tabs needs to be filtered by a select box that sits outside the tabs div.
Here's where my problem starts. Let's say my tab makes an Ajax call to the URL "tab1.html." jQuery tabs changes this target...
I have a form and have several text box, and a dropdown list. I am using the following jquery code to get the values of my form
// JQuery Code
parentFormName = $(this).parents('form').attr('name');
xajax_addNewRecord( xajax.getFormValues(parentFormName) );
My php code looks something like this:
protected function addNewRe...
Given a table row, I want to get the HTML out of the span element that's in the last td in a row.
I ended up with:
$row.children("td:last").children("span:first").html();
I tried:
$row.children("td:last > span").html();
and
$row.children("td:last span").html();
But neither worked. Is there a way to crunch this into a single se...
After loading dynamic content to a DIV, I'd like to add a Close option, that would remove this content from the DOM.
I'm working with jQuery and WordPress.
Any ideas?
...
I'm building an Adobe AIR application with a bit of jQuery to dynamically change the display of the application. Part of the display includes links with Javascript functions on the onclick event except, in the application, onclick is disregarded when the div has been manipulated by jQuery. I've confirmed that onclick works fine when it's...
I'm a jQuery newbie as of this morning, and this is the code I've come up with to show a div that accompanies the anchor that calls it, inside a div with the class 'foo'. It doesn't work :P
$('div.foo').children('a').click(function(event){
event.preventDefault();
if ($(this).closest('div').('div').is(':hidden')) {
$(this...
I apologize in advance if this is a stupid question that betrays my lack of understanding of javascript/programming.
I've been using $.each to do iterations for a while now, but I keep on hearing people say to use native JS for to do loops. I'm very concerned about performance but I am not sure if it's always possible to replace $.each...
So the short version of this is: Can I traverse only the elements within the matched element of the selectors before the each()? Or is there a simpler way of getting what I want without an each() loop?
I thought this would be much easier, which makes me think I'm just missing some fundamental principle of element traversing with jquer...