jquery

jquery scrollTo refuses to work

hey, ive read all the scrollTo questions and couldnt find the answer. im trying to use the scrollTo plugin for a simple horizontal scroll (the site is horizontally designed). im using the following code $(document).ready(function() { $('#contactlink').click(function(){ $.scrollTo("#conta", {duration: 8000 }); }); }); as is obvious, ...

Hide div after specific time and after buffer the flash video.

Hi i embed a video in my html page and i want to hide div after complete the video. and a specific time.my video time is 12 sec. I am using this function $('#fvideo').fadeOut(12000); and html code. <div id="fvideo" class="video"> flash video </div> UPDATE actually what i want is that flash video fadeOut time should...

jquery $.ajax call succeeds but returns nothing. (jsonp)

$(document).ready(function() { $('#button').click(function() { try { var json = $.ajax({url : 'http://www.example.com/experimental/service.php', type : 'jsonp', success : function() {alert('success')}}); alert(json); } catch(err) { alert(err.description) } var sjson = JSO...

How do I access the array submit() calls in the dom?

I want to grab all the inputs inside a form, in order to submit them. The point of this is to use jquery's ajax to submit a dynamically sized form. Surely there must be an array inside the dom somewhere which i can just do something like... docment.forms['form'].elements which only lists inputs for that form, meaning I can loop throu...

Why don't this toggle animation execute in all browsers

Hey guys This file isn't executing in any browser other than firefox on mac. Added everything i can think to get it sorted. http://samhorner.co.uk/dev/samhorner/ Clicking on the twitter bar should close it, then open it again when you click on it again, only one click works on the other browsers. The blue box is a flash area in the ba...

How do I change the CSS from a web page contained in an object tag? (XHTML, jquery)

Hi! I've been having a bit of a problem with jQuery and XHTML. Basically, I've got an object tag that contains a Web Page in its data attribute. Now, what I want is that when I click a button I get this web page and dynamically change the CSS file it's currently using. I've tried to get the page by using jquery, but all I get is the ob...

jquery serialize()+custom?

When using $.POST and $.GET in jquery is there any way to add custom vars to the URL and send them too? i tried the following : $.ajax({type:"POST", url:"file.php?CustomVar=data", data:$("#form").serialize()}); And : <input name="CustomVar" type="hidden" value="data" /> $.ajax({type:"POST", url:"file.php", data:$("#form").serialize()...

Answered: Selecting even table rows from a table element

The issue I am having is: How do I go from a variable pointing at a dom element to using CSS selectors? I want to make this work: function highlight(table) {$(table " > :even").toggleClass('highlight');} where table is a reference to a table element. I don't want answers that tell me to use $('#table') because that defeats the poin...

jQuery - Set min-height of div

This is probably really easy for most of you. But I'm in need of a small snippet that looks up the current height of a div (the div has a dynamic height based on the content inside it) and then set that value in the css class's min-height value. Basically what this means is that I want this container to have it's min-height to be the ex...

Display data as a mindmap

On this screencast, at time 16:15, Paul Nielsen talks about displaying data as a mindmap. How could I do that? ...

jquery stop image slider when accordian menu is closed

http://jsbin.com/emoba5/3/edit click here to view demo Does anybody know how to make the image slider go blank if all menu items are closed? Our how to make it stop on the first image if there is only one image, i.e. posture 3 Im stumped?! ...

jquery xml slideshow using ajax

Hi all, I am trying to create a JQuery based slider using ajax to load images url from a xml file and then creating a html li list dynamically. Till now I am able to append and create DOM structure using Jquery. But I am not able to access the dynamically created list. I have also tried custom events using bind but not able to succes...

How do I make a new div with a specific Id + n?

I've got a button and when it's pushed this code launches: var nrDivs = "1" var neuDiv = document.createElement("div"); neuDiv.setAttribute("Id","theDiv" + nrDivs); neuDiv.innerHTML = "Text"; $('#allDivs').append(neuDiv); newfeed.draw(neuDiv); I know that right now the script creates a new div with the ID: ...

How to incorporate jquery menu with asp.net membership

Hi guys, I am using Asp.net menu control for the web site that I am currently building and I am thinking to change to work with jQuery menu. So the current menu (Asp.net menu control) works with asp.net membership as many of knew.And the menu changed based on the role of the user who logged in. Is it possible to change the menu control ...

jQuery on click event send POST request

Trying to send POST request on click event using jQuery with no luck. Here is what I use: <script type="text/javascript"> $('#taxi_update').click( $.ajax({ 'type':'POST', 'data':'id=17446&chru=0', 'success':function() { ... }, 'error':function(){ ......

How to call a prototyped function from within the prototyped "class"?

function FakeClass(){}; FakeClass.prototype.someMethod = function(){}; FakeClass.prototype.otherMethod = function(){ //need to call someMethod() here. } I need to call someMethod from otherMethod, but apparently it doesn't work. If i build it as a single function (not prototyped), i can call it, but calling a prototyped does not ...

Auto-Selecting Navigation works for active page but how to add class to parent menu items?

I am following this article http://docs.jquery.com/Tutorials:Auto-Selecting_Navigation I am able to successfully add a class to the active page li menu item but does anyone know how to modify or add to this script so that any parent menu li items also get the active class? I would like to avoid having to add ID's as the menu items will...

How do I show the print with AJAX/jQuery?

So I'm trying to understand this whole AJAX/jQuery thing. Right now, when I run this PHP script alone, I would have to wait and watch the wheel spin until it's done with the loop and then it will load. while ( $row = mysql_fetch_array($res) ) { postcode_to_storm( $row['Test'] ); $dom = new DOMDocument(); @$dom->loadHTML($re...

Netvibes like "draggable boxes" with javascript

Do you know any project/framework in javascript (jquery or anything else) that has nice draggable windows that snaps in some fixed places like netvibes has? I found jPolite v2 but it seems a little too complex for what I want to do. Any idea? ...

Why does this code send the form input to the URL?

How do I get this form input to be stored in a variable, that I can then use later - rather than being appended to the end of the URL? <script type="text/javascript"> $(function() { var tag_box = $("<div>").appendTo("body").css({ "width": "40px", "height":"40px", ...