jquery

jQuery: text() vs html() ?

Using jQuery, what the difference between: $("#div").html('<a href="example.html">Link</a><b>hello</b>'); vs $("#div").text('<a href="example.html">Link</a><b>hello</b>'); ...

jquery, get id/class/other from clicked item and reuse

Hello I have this: jQuery(document).ready(function(){ jQuery('a.color2030').click( function() { jQuery('tbody').hide(); jQuery('tbody.color2030').show(); }); jQuery('a.color2031').click( function() { jQuery('tbody').hide(); jQuery('tbody.color2031').show(); }); ... ... jQuery('a.color...

moving balloons jquery problem

Hi, I really want to get into jQuery first of all. I have a site im making, ove a balloon is clicked on it floats up and then goes to the targeted page. However they seem to bash into each other. <script type="text/javascript"> $(document).ready(function(){ $("a.balloon-nav").click(function(event){ var target = $(this).attr("h...

How can I make a database driven list/feed that can be updated with jQuery ajax?

I'm wanting to know what the best way to go about creating a list of say, users's statuses (similar to what facebook/twitter has) that is loaded in with PHP when the page loads. But ajax checks for new status updates every 10 seconds or so. It looks like to me that there are about 2 options: Put the "new items" html in the PHP file th...

Open save as dialog on newly opened window

How in JS/jQuery do I pop open the "Save As" dialog for a newly opened window. Basically I am scraping some data off of a web page. As such I am opening a new window via: dataWindow = window.open('blank','dataWindow'); I then write the output to the blank window but I want to automatically pop open the "Save As" dialog to save the c...

JQuery UI Dialog Box and Ajax.BeginForm

Hi, I have a JQuery UI dialog box. The app allows people to create lists and this dialog lets them specify the listname. Here it is: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> <%= Html.ValidationSummary("Create was unsuccessful. Please correct the errors and try again.") %> <% using (Ajax.BeginFo...

make div text disappear after 5 seconds using jquery ?

Hi i need to make a div text disappear after x seconds of displaying it using an ajax call can you help me on this please ? thanks ...

PHP/ Ajax/ jQuery - Equivalent for my code

I have the following code and would like to use jquery to make it simpler: var auctionBidAjax; function auctionBid(auction_id) { auctionBidAjax=GetXmlHttpObject(); if (auctionBidAjax==null) { alert ("Your browser does not support XMLHTTP!"); return; } var url="/cms/ajax/auctionBid.php?auction_id="+auction_id; auctionB...

Selector only knowing tbody and iterating

This is driving me nuts...I am trying to iterate through rows in a table. I know the classname for the tbody. Can I just specify the class for the tbody and iterate through the rows? For example... <div class="dclass1" ...> <table summary="" style="margin-top: 0pt;"> <thead ...> <tbody class="tbClass1" ..> ... ...

fill in space with the next element with slide animation

basically what I wanted to do is whenever an li is removed (via jquery .remove()) the set of li's slide to the space previously occupied the removed li. How can I accomplish this? Here is some code: <li class="be-imagecontainer"> <span style="display:none">101</span> <img src="http://localhost/thi/media/images/thumbnails/19_Koala.jpg"...

Legacy iframes, what is a full fledged replacement for them?

A site heavily using a main iframe I inherited a legacy codebase/website, http://ninjawars.net . The iframes were in place before I started coding on the site. I constantly hear about the problems of iframes (security, accessibility, layout issues), and I'm pretty certain that iframes aren't friendly for search engines (a big minus). ...

jquery stop mouseover event after click event

Hello, can someone help me with this I am trying to set a different color for the element from the click event. The problem is that the mouseover event makes everything white again. So, I will never get to see the color off the active(actief)class. What could I do, I already try'd putting in the line stopevent propagation()?? thank...

Jquery mouse one event with mouseover (fadein and fadeout)

So i'm trying to make the div content1 fadein when I go with my mouse over the div logo1, content1 should fadeout when my mouse isn't over logo1 oh and the content div's have visibility: hidden on the css. Same goes for logo2 3 and 4 I've tried this code but it didn't work for me (I didn't add fadeout because I dont know where to add it...

Detaching/Opening an iFrame into a New Window - How?

Hi, I have an iframe setup within a page and basically want to know whether it's possible to have a button in this iframe and when pressed, opens the iframe into a new browser window, showing the contents of the iframe. If possible, would really appreciate any help using either javascript or jQuery on how to achieve this. I am using I...

Adding Randomly choosen class to html tag using jQuery

Hello Gurus! Whet I need to do is in my menu I would like to add one of the classes (listed below) with completely random order every time when function starts (page load) This is my HTML <div id="menu"> <ul> <li><a href="#">Home</a></li> <li><a href="#">About Us</a></li> <li><a href="#">Portfolio</a></li> ...

jquery or extjs plugins for creating organization chart

I know we can create organization chart with http://code.google.com/apis/visualization/documentation/gallery/orgchart.html but my clients server doesn't have internet connection. is there any jquery or extjs plugins for creating it? thanks :D ...

Should I do money calculations in Javascript or as an AJAX call?

Hi, I'm building a webapp using JQuery, Stripes, Spring and JPA (Hibernate). I have a page that allows users to enter a number of order line items and each time onblur occurs in the price field, I have a JQuery event bound to the field which sums all the price fields (this is a subtotal), calculates 10% tax and adds the tax to the subt...

Form Submission- success

Hey guys, well I have a very weird Form Submission problem on which I wasted days and still cannot figure it out: 1) when I fill in the form properly (for a new user) works well 2) if I try to register a user with an existing email... it just refreshes instead of throwing an error 3) if I submit the form after a failed attempt I do not ...

jQuery: How to set the index of the current open div in jQuery UI accordion?

I'm trying to get a jQuery UI Accordion, with initially all divs collapsed. The doc says // getter var active = $('#div0').accordion('option', 'active'); // setter $('#div0').accordion('option', 'active', -1); Neither of these was working in v1.7.2. The getter always returned null, and the setter had no effect. I found t...

jQuery without chain?

I know it's possible to write jQuery in more JavaScript like syntax rather than the all chain stuff (which is great). It's hard to find a piece of tutorial that provide an understanding for people who want to use less chain-able script, so where I can find any type of tutorial(s)? While the chain was not bad, it requires a learning curv...