jquery

jQuery Flip! click events inside divs

I am trying to make a flash card studying web app for a school project and I wanted to use Flip! I have an issue, though when I put the anchors with their click events bound to the flip function inside the divs to be flipped. I am new to jQuery. Any help would be appreciated. Is there a flip forum? My code is below. <!DOCTYPE html PUBLI...

How do I activate the chrome's cookie function on local files

I'm using the "jQuery Cookie Plugin" on my homepage but it doesn't work in only chrome. And I use only chrome too. help please ...

browser navigate to link before $.ajax request can finish

upon clicking an anchor link, i send an $.ajax request to the server. however, before it can finish, the browser navigates to the href location. originally i have placed e.preventDefault on all anchor, and upon success: doing a window.location to the href. this works very well, but for anchor's which dont have href attribute, instead ...

jQuery: Made json request, process it in callback, access it outside the callback function?

$("select[name=field[]]").live("change", function() { $.getJSON("/json.php",{id: $(this).val(), ajax: 'true'}, function(j){ options = ''; for (var i = 0; i < j.length; i++) { options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>'; } }); ...

how to delay default action?

in jquery, i need to delay the default behavior of anchors, so that in the meantime, ajax post request can complete itself. preventDefault or returning false in .click event wont do, as I still need to navigate to those pages. window.location = href obviously fails because some anchors do not have href attribute instead uses javascript....

Is there a Jquery plugin for working with window resizing? (esp frames)

Is there a JQuery plugin that makes easier handling window resize events? Specifically I would like the google maps iframe to resize when the window does - just like a div. Can jquery help? ...

how to make a navigation such as this

I stumbled upon this site http://nathanborror.com/ and really loved the way they have done the navigation on the left hand site. I noticed that site is using jquery but didnt see any plugins. Any ideas on how to go about doing this? ...

jquery's .click() doesn't work ?

when there is <a href="javascript:onclick:alert('hi')"> click </a>. how come $('a').click(); doesn't make the alert popup? ...

Jquery Json dynamic variable name generation

I make a jquery .ajax call and I'm expecting a json result. The catch is, if there are say 5 authors, I'll get author_details_0, author_details_1, author_details_2, etc.... How can I dynamically construct the name of the variable to retrieve from json ? I don't know how many authors I'll get, there could be hundreds. $.ajax({ type: "POS...

Data through jquery's ajax not being sent.

Hello. I've got a webpage which needs to load some data from a database. In order to do that, I'm using jquery's $.post function, which loads a file called photoList.php, as follows: *(photoList.php)* <?php include 'mysqlConnect.php'; $query = mysql_query("SELECT name FROM images"); $photoList = Array(); while ($row = mysql_fetch_asso...

Why doesn't this work: $("body div button")[0].css...

Given this HTML: <div id="flashcard-001" class="flashcard"> <div class="question">What color is the sky?</div> <div class="answer">blue</div> <button class="show">Show</button> <button class="hide">Hide</button> </div> This works: $("div")[1].innerHTML = "What color is an apple?"; $("div")[2].innerHTML = '<span style="font-size:4...

Input inside Fancybox

Hi All, I have a very strange problem with Fancybox. I can't seem to get the .val() of the inputs which are displayed in Fancybox. They have a value of "". The inputs outside of Fancybox, however work. My code: <script type="text/javascript"> $(document).ready(function() { $('a#inline').fancybox({ 'hideOnContentClick': false, 'fr...

how to get rel value of clicked element

hi im trying to get the rel value of a button that is click: function forwardStep() { $("#forwardStep").bind("click", function(){ var page = $(this).attr('rel'); thats pretty much the basis but is return "undifined". Do you know why? Regards Phil Jackson ...

Javascript not working as expected, why?

Hi, I have javascript to set equal column heights of two divs contained by a parent div. Somebody even coded an working example that works (mine doesn't). What I have found is that it IS setting the height of the container which contains the two divs I intended to set. Why is my script setting the container height rather than it's ch...

Incorrect Toggling (jQuery)

I've a simple menu on my page, that uses this jquery code for basic toggling: $("#left-nav .block h3").click(function(){ $(this).next("ul").slideToggle("fast"); $(this).toggleClass("active"); $(this).siblings("h3").removeClass("active"); }); The UL is open (display:block via CSS) by default, so on first click, the UL hides (whic...

jquery, fancybox, ie7 and a random white box i can't explain

there's a random white box showing up in my ie7 below the footer. looks fine in firefox/safari 4/chrome. i used debugger to inspect and it's showing up as a fancybox div. thing is, i don't think i'm using fancybox anywhere. confused. http://bit.ly/bT2CI ...

Apply class to element if div is hidden or visible.

Check out my example here: http://timkjaerlange.com/foobar/test.html I'm currently trying to apply a class to a header based on the visibility of a div on the page. This is my markup: <a href="#">Toggle visibility!</a> <div></div> <h1 class="one">If the box is hidden this headline should be italic.</h1> <h1 class="two">If the box is...

click event of parent triggered

Problem is solved, i made another stupid mistake in my code... sorry, thanks example: <div id="window1Header" class="windowHeader"> Window 1 <a id="min1" class="minimize">[-]</a> <a id="max1" class="maximize">[+]</a> </div> <script> $(function() { $(".windowHeader").mousedown(function () { $(this).parent().css({"border"...

display jquery prettyPhoto lightbox in iframe parent

Hi, I am using jquery prettyphoto 2.5.3 and I was wondering how I can get the light box to display in the parent window of an iframe when an image link inside the iframe is selected? Here's my code: Page in the iframe: <html> <head> <script src="js/jquery-1.3.2.min.js" type="text/javascript"></script> <link rel="stylesheet" href="c...

How to add drop shadow to the current element in a tab menu?

I've got a tabbed menu that looks something like this: The html for it is simple: <div id="menuContainer"> <ul id="menu" class="undecorated "> <li id="menuHome"><%= Html.ActionLink<HomeController>(c=>c.Index(), "Home") %> </li> <li id="menuAbout"><%= Html.ActionLink<UsergroupController>(c=>c.About(), "About") %> ...