jquery

Pre-load audio files at the client-side for later use

I'm building an online test which implements audio (mp3) using the native audio player (i.e. non Flash-based). The test shows one question at a time and loads each subsequent question asynchronously. Some questions have an accompanying audio file, others don't, and the audio files can be several MB in size. So what I'm hoping to do is...

Expanding videoplayer like CNN-website, prerably jQuery-based

I'm wondering if anyone knows of a script/plugin, jquery-based or otherwise, which could be used to achive the effect that can be found on CNN.com. I'm talking about the videos that are representet by a small thumbnail, that when clicked expands in to the text and plays. I'm by no means a JS-guru, and me and flash isn't the bestest of ...

Private JQuery instance

We are writing a SaaS like solution that requires our customers to SCRIPT SRC some javascript code we are building (think Google Analytics scenario). We would like to use JQuery. However, since our customers might already have conflicting JQuery versions or other conflicting frameworks (prototype.js for one) we cannot tell them to source...

focus after animate

i'm tring to focus a textarea after a animate effect with: $("#textarea").live("click",function(){ if ($(this).attr("class") != "textarea_clicked") { $(this).val(""); $(this).animate({ height: "+=30" }, 150, function(){ $(this).attr("class", "textare...

Javascript scope problem with object and setTimeout

I'm trying to make a jQuery plugin that executes a method on a timer. I'd like it to work on multiple elements on a page independently. I've reached a point where the timer executes for each element, but the method called in the setTimeout seems to only know about the last instance of the plugin. I know I'm doing something fundamentally...

Function pointers in javascript using django

Is this a valid function pointer code below, In views , def change(request): dict={} function_ptr="create()" dict.update({'function_ptr' : function_ptr}) return render_to_response('mpjt/create.html',context_instance=RequestContext(request,{'dict': dict})) In create.html $(document).ready(func...

Easy jQuery question, nested selectors and parent

Hello, I would like to hover an image and popup a div, without plugins. just basic jquery the jQuery is like this: <script type="text/javascript"> $(document).ready(function() { $(".wrapperfortooltip div img").hover( function() { $(this).css('border', 'solid 1px #E90E65'); $("div", this).stop().fadeI...

What's the best jQuery plugin to show up a popup bubble when the user hover some text?

Like the effect you get when you hover "Subscribe" in Youtube ...

Can a Jquery Ajax Call Accept an Object on Succes from PHP?

I'm writing a simple ajax function and looking to populate two text input fields with the 'success' results. I'm wondering what my php syntax has to be to return an object. Here is my Javascript function function editModule(a){ data = {moduleNum:a} $.ajax({ type: 'POST', data: data, url: 'includes/ajaxC...

I'm cloning a table row that contains an input that's being set to jQuery TimeEntry that errors when the getTime is called.

I'm adding a TimeEntry to a page where the user can add a row (clone) to a table. The row that is cloned is hidden (display:none). The user clicks a button and javascript is run to clone the row which renames all of the fields and then appends the new row to the table. <tr id="blankRowShift"> <td> <input type="text" id="timeStart" na...

Dynamically added Draggable won't drag

I am adding a draggable DIV dynamically but when I click and hold on it to drag it, it will not drag. I am adding it like so: $("#leftPersonalContent").append(leftSlotContent); $("#" + firstID).addClass("ui-draggable"); where leftSlotContent is of the form <div id="puzzlePiece_left_2" class="personal draggable ui-draggable">....</div>...

jquery masonry - allow for toggle (toggle goes behind div element)

Hi, I am using a simple toggle effect. //Hide (Collapse) the toggle containers on load $(".toggle_container").hide(); //Switch the "Open" and "Close" state per click $("h4.trigger").toggle(function(){ $(this).addClass("active"); }, function () { $(this).removeClass("active"); }); //Slide up and down on click $("h4.trigg...

How to select the contents of jQuery combobox on focus().

I am using a slightly modified version of the combobox jQuery widget. The problem I am having is that the mouse click doesn't work as I had expected. I want a mouseclick on the input to highlight the contents of the input. This doesn't bring focus to the input, like I wanted. Here is what I have: (function($) { $.widget("ui.combo...

jquery: how can i load the Google Maps API via ajax?

Before you reply: this is not as straight foward as you'd expect! I have a 'show on map' button which when clicked opens a dialogbox/lightbox with the google map in. I don't want to load the maps api on pageload, just when a map has been requested This is php file the "show on map" button puts into the dialog box: <div id="map_canva...

How can I add line breaks into my event title in json

one thing i can not get straight is the ability to add html without it being escaped or actually creating new lines here's my json: { "id": 30, "title": "Basics \n Awesome Abs & Butt Blast \n Danielle B", "start": "2010-05-11T08:00:00-04:00", "end": "2010-05-11T08:30:00-04:00", "allDay": f...

How do I determine if form field is empty with jQuery?

I've got a form with two fields, firstname and lastname. The user does not have to fill in the fields. When the user clicks the submit button, a jquery dialog displays with the data the user entered in the form. I only want to show the data for the fields that were entered. I'm trying to do an if statement and use the length() functio...

Trying to get a json result back from method in another namespace, having issues

I have a seperate .js file and namespace for json requests. I have another .js file and namespace for the actual logic. I can't seem to get the result back in my logic layer. var jsonResult = Blah.Data.LoadAggregates(); alert(jsonResult); alert(jsonResult.d.length); alert(jsonResult.length); all of the above calls are returning unde...

What should I make as my first JQuery application?

I want to get better at JQuery, but I don't know what type of application I should make to test my skills. What would you suggest that would not be too hard so I would get frustrated as a beginner. Any help is appreciated. Thanks! (sorry if I sound like a noob, by the way =P) ...

Allow a div to only grow vertically for x amount of pixels then show scroll bar?

So, basically if a div reaches 50px I want to, then, turn on the scroll bar (vertcially). Any JQuery Ideas would be nice. ...

scale image in div after load complete with jQuery

I have some thumbnails and when you click on them I have a Modal box with a DIV that I want to scale 50% w/h from the bigger image. I would like to know if the following method for scaling is valid and cross-browser for an image of 800x530px: #foo-img { width: 100%; height: 100%; } #foo-div { width: 400px; height: 265px; padding...