jquery

Unable to execute functions on elements loaded with AJAX (jQuery)

i am using .prepend() to load data after i POST a form with .ajax(). once the new elements are added, my functions won't work on them. if i link the js file directly in the prepended data, the functions work, but when i POST, i starts multiplying the events. i have a feeling it has something to do with binding, but i am not able to f...

div contenteditable="true"

Okay!... I'm facing this for hours now... html <div contenteditable="true" style="width: 509px; "></div> <textarea cols="50" rows="10"></textarea> ​ jQuery $('div').keyup(function(){ $('textarea').val($(this).text()); }); $('textarea').keyup(function(){ $('div').html($(this).val()); })​;​ I want it that whatever I type in...

What's the best reading to start JavaScript?

Possible Duplicates: Best resources to learn JavaScript A Beginners' Guide to Learning JavaScript? Where to start to learn JavaScript (especially developing node.js+JQuery applications) from zero to expert level (having good C# and some PHP5 experience)? Can you recommend any must-read books and/or cool articles/blogs? ...

jQuery.next on a text snippet with no selector

Here's some example code: <input type="checkbox" id="send-notice" name="send-notice" value="1" /> This is a notice to all users. <label for="subject">Subject</label> I want to be able to select the text "This is a notice to all users." so I can remove it. I'm not sure how to do so though. I've tried using jQuery('#send-notice').n...

Problems with Directions API in Google Maps V3 and jQuery

Hi, I'm trying to get Google Maps Directions API working with jQuery, and I have the following code.. http://pastebin.com/6jcGt706 Where #end is a select list in the HTML.. I'm Using jQuery 1.4.. I'm not sure as to what is going wrong.. Can you please help me with this... Would appreciate if any one could help me fix the problem with...

jQuery - Selecting a text box before a span tag with certain CSS class

Hello, I am a beginner in jQuery. It would be great if somebody could help me with this. I am not sure what's going wrong here. This is what I am trying. I have a element with class as "spanClass1". Before this element there is another element and a text box element. My requirement is to scroll to that text box element and gain focu...

changing jquery 'this' and 'next', to a specific element

Im working with the following code; <a href=\"#\" onClick=\"if($(this).next('div').css('display') == 'none') { $(this).next('div').show('fast'); } else { $(this).next('div').hide('fast'); } return false;\">Link</a> What i need to do, is change the part if($(this).next('div'), to target a specific element ID, not the next one from curr...

Custom widgets using MooTools on Django Admin pages

I have a custom widget that I would like to make available to a Django Admin page. This is easily implemented using the formfield_overrides attribute of a ModelAdmin subclass, and using the Media child class, I can define the necessary JavaScript and CSS for this widget. This works rather well. The only issue is that my custom widget req...

Passing parameter map (list of values) to JQuery

Hello, to initialize a javascript loaded grid, I need to pass a list of values from controller/gsp. Since the javascript is activated once the page is rendered/loaded, there may not be a direct way to do it. 2 possibilities 1. do an ajax call, and retrieve the list of values from the server 2. store the list in html as a hidden element...

Problem loading js content with ajax

I have a page that loads content into a single div via a script in the page. It works fine but the problem is that I have a lightbox in one of the dynamically loaded pages that only works the first time you navigate to it (the script I got for the page loading is found here). Once you navigate to another area, then back again, the lightb...

Select ID in table ...

Hello, I have this code <% foreach (var item in Model.List) { %> <tr> <td><%: item.LastName %></td> <td><%: item.FirstName %></td> <td><%: item.IsEnable %></td> <td><a href="#" class="CustomerEdit">Edit</a></td> <td><a href="#" class="CustomerDetail">Detail</a></td> <td><a href="...

asp.net mvc jquery removing select list item

$('#remove').click(function() { var foo = []; $('#FeatureLists :selected').each(function(i, selected) { foo[i] = $(selected).text(); alert(foo[i]); if (foo[i] != "Add" ) return !$('#FeatureLists option:selected').remove(); if (foo[i] != "Edit") ...

reactivating or binding a hover function in jquery??

hi guys, with the following three lines: $( ".thumb" ).bind( "mousedown", function() { $('.thumb').not(this).unbind('mouseenter mouseleave'); }); i'm unbinding this hover-function: $(".thumb").hover( function () { $(this).not('.text, .file, .video, .audio').stop().animate({"height": full}, "fast"); ...

jQuery UI Sortable Position

how do i track what position an element is when its position in the list/sortable changes? ...

html5 video player with simplest controls (only play and paus)

hi guys, somehow there are really little tutorials out there for html5 video and audio playback. I simply want to embed video and audio files with customized controls. However the controls should be farely simple. I only need a play-button. If clicked, play gets replaced by pause. that's all! however i even don't know how to embed/disp...

Set value of hidden field in a form using jQuery's ".val()" doesn't work !

I've been trying to set the value of a hidden field in a form using jQuery, but without success. Here is a sample code that explains the problem. If I keep the input type to "text", it works without any trouble. But, changing the input type to "hidden", doesn't work ! <html> <head> <script type="text/javascript" src="jquery.js"></scri...

Autoplaynig video/image gallery - with a catch

Looking for a (jQuery) video/image gallery to implement on my website, I've found many freely available option. However, I need one that, when in "autoplay" mode and gets to a video file, automatically plays an entire file, and only then moves on to the next image/video. Similar to what Picasaweb are doing when you ask to autoplay an on...

Use jQuery to Enable/Disable a Button based on vars

Ok so, Im using jQuery to do username and email checks before a signup... this sets a variable true or false depending on the response from php. $(document).ready(function() { if (usr_checked == true) { if (em_checked == true) { $("#registerbttn").removeAttr("disabled"); ...

Pass data via ajax to dialog Jquery

I am trying to post data from my form to a jquery dialog that loads external content. I am serializing the form data which works (appears in the url) but the dialog won't open: $("#wavajax button").click(function() { $.post({url: 'player/index.php', data: $("#wavajax").serialize(), success: function (data) { ...

jQuery ajax call failing with undefined error

My jQuery ajax call is failing with an undefined error. My js code looks like this: $.ajax({ type: "POST", url: "Data/RealTime.ashx", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", timeout: 15000, dataFilter: function(data, type) { alert("RAW DATA: " + data + ", TYPE: "+ type); ...