jquery

jQuery serializeArray doesn't include the submit button that was clicked

I have a form that has two buttons. One for saving a record and the other for cancelling the save procedure. I am using the rails.js (a common AJAX/jQuery plug-in for those of you not in the know) javascript file that works with jQuery for unobtrusive javascript/ajax calls. When I send the form data over ajax, I want the name and value ...

What's name of this article rotating feature?

I developed article rotator where 5 articles with images rotate automatically and user can focus one (and stop rotating) by mouseover. Click will open the article. The article rotator is here: http://antizena.df.sk/ and it is just devel version. How to name it? What is the best name for this feature? ...

Jquery SPdesigner.

Hi, I have requirement in SPDesigner. There are list of options in a drop down. There is one more drop down in the same form. Depending on the first drop down some of the options should be removed from the second dropdown. Depending on other options some other options have to displayed. First drop down: <select id='firstdropdown' na...

Load Script with jQuery - IE fails

Hi, i try to load a JavaScript dynamically with jQuery to initlialize my ajax-application. I want to get a handler-function called, when the script was loaded successfully. This is what my code looks like: var $script = $('<script type="text/javascript"></script>').appendTo('head'); $script.load(function() { ... }); $script.error(funct...

flexigrid popup modal window

Hi Guys and Gals, I am trying to create a script using FLEXIGRID as a method to display the information from a database, but I want the users to able to input info into the database as well. I would like to be able to launch a modal window where the user can input the information and submit it. The way the buttons on the FLEXIGRID are c...

Clone div and rename element ids incrementally

Ok lets say I have div with form elements inside of it. I want to be able to clone that div with a button click using jQuery and add a version 2 of the form, so ALL of the element IDs will increment by 1 in their name. <div id="card"> <!-- PART 1 --> <h1 class="card_build">Build your card options:</h1> <select id="country...

Why does this HTML never trigger this jQuery function?

I did not define showprayer as a class in my CSS stylesheet. Is that the reason this jQuery function is never called for the HTML below? $('.showprayer').click( function(event) { console.log("showprayer"); $.post('/show_prayer', { 'name' : $(this).text() }, function(data) { //... do something wit...

jquery-tmpl - template function not working

Hey! The following code: jQuery(document).ready(function($) { function getBooks() { var query = "ajax.php?do=allbooks"; $.ajax({ dataType: "jsonp", url: query, jsonp: "callback", success: showBooks }); } function showBooks(data)...

Javacript toString() problem..

hello.. i just want to ask if how to convert the number to String.. what i want to output is "000000" incremented per second "0000001".. i tried different methods but it will output to 1,2,3... i tried this but still won't work.. $(document).ready(function(){ xx(); var x = 0; function xx() { x++; if(x.length==5) { ...

jQuery GalleryView Wordpress Plugin is giving me "is not a function" error

I'm attempting to use NextGen Gallery plugin with the new jquery slideshow plugin GalleryView. These are supposed to work lovely together. NGG works on my site if I just go with the default Flash player but that's not going to work for me. So I installed the new GalleryView plugin and put the short code as needed but as you can see on t...

What's needed here for the ajax server response to be executed as-is in the jQuery ajax post function?

The jQuery function below returns this string: '#prayer_date'.html("03/19/1968"); But it doesn't get executed because the function below doesn't act on the data variable. What would you need to do to have the result above executed as-is in the function below? $('.showprayer').click( function(event) { $.post('/show_prayer', { 'nam...

Trivial JQuery $.ajax Json Post to ASP.NET MVC2 controller: Cannot get Controller to see JSON (or anything)

I went through dozens of answers to figure out the trick to posting data from $.ajax to a parameter in MVC 2's Controller. Here's as far as I got: BTW this works if you use a GET, but fails as a POST. How would I fix it? $(document).ready(function () { $.ajax({ type: "POST", url: "/Home/Get", data: {value:...

Toggle a repeated class in jQuery

Hi, I have this HTML code: <div id="content"> <div class="profile_photo"> <img style="float:left;margin-right:7px;" src="http://gravatar.com/avatar/53566ac91a169b353a78b329bdd35c95?s=50&amp;d=identicon" class="profile_img" alt="{username}"/> </div> <div class="container" id="status-#"> <div class="message"> <span class="...

Pick the biggest height of all elements.

This is my code. v=dom.find("ul:first").outerHeight(); // the height of the first li element // instead of taking the height of the first li element, it should loop through all // li elements and set v to the element with the biggest height The comment in the middle of the code pretty much explains everythi...

How to make a div scroll when I scroll after certain point?

I would like to create a div, that is situated beneath a block of content but that once the page has been scrolled enough to contact its top boundary, becomes fixed in place and scrolls with the page. I know I've seen at least one example of this online but I cannot remember it for the life of me. Any thoughts? ...

jQuery: issue with functions to appended text

I am trying to make an "More" after 10 posts of the news topics. To these news topics, there´s some functions, you can click comment, then appears and you comment without going to another page (AJAX call) and some other like this. This works fine on the first 10 posts. Now when you click More at the bottom of these 10 news topics, you ...

jQuery - Using Live to open a Window,and then close it?

Hello, I have a Dialog box to all a user to click a project, that opens on click.... Here's the code: $("#byproject").live("click", function() { $("#projectPicker").fadeIn(); return false; }); // Close the space dialog on selection $(".projectSelect").live("click", function() { $("#projectPicker").fadeOut('fast'); }); This...

Is there much significance in the choice of $.ajax() over $.post()?

According to this answer, it is better to use the $.ajax() function: $('.showprayer').click( function(event) { $.ajax({ url: '/show_prayer', type: 'POST', data { 'name' : $(this).text() }, dataType: 'script' }); }); rather than the $.post() function: $('.showprayer').click( function(event) { $.post('/show_praye...

[SOLVED] Jquery live does not seem to work in nested calls

Hi, I am encountering a problem of jquery live function not consistently working for me (or that what I think). I have the same html form which is used for both adding new comment and editing an existing one; this form is propagated using a php code at the server side through a GET call. The two forms are displayed in two different ta...

jQuery attribute doesn't change

As I'm a newbie to jQuery I'm having a little problem. I have two divs with product images, below them I have a couple of "color selectors" to let the customer look at what colors that's available. When the user hovers one of the "links" I have a new div showing with a color in it. Bla bla... The problem I'm having is that it always pick...