jquery

Adding a PayPal 'Add to Cart' button to the caption section in Lightbox plugin for jQuery.

Hi there, The person I am making a website for has asked for a PayPal 'Add to Cart' button to be displayed underneath an image when it is being displayed in the Lightbox popup. I can't figure out how to do this at all. Does anyone have any ideas? :) Thanks very much in advance. P.S. I say another similar question on here, but I am un...

Can I disable the ESC key close in SimpleModal

Talking about SimpleModal the jQuery plugin. Most of the time I think it is a handy feature but I am finding that in a certain case I need to remove it. What are my options? ...

jQuery :last-child selector

How do I add class="x" to the last table cell that's on the same row as the one that has class="insert"? Something like: $('td.insert').parents('tr').(':last-child').addClass('x'); ...

Passing dynamic CSS to jQuery.animate

The documentation of jQuery.animate states that The only required parameter is a map of CSS properties. This map is similar to the one that can be sent to the .css() method, except that the range of properties is more restrictive. So, why does this work $('#con div').css( { top : function(i) { console.l...

jquery.serialScroll not working

Hi - I am having issues with jquery.serialScroll not working in my case. I have a div id=ticker which basically works like a scrolling ticker. something like this - http://www.tinymassive.com/ (whats happening section). So i am prepending dynamic content to div id=ticker, and i want scrolling animation from top-to-bottom as shown in the...

Google Maps: How does Trulia create their custom InfoWIndows?

I really like how Trulia.com has created their custom Google Map InfoWindows. What I like in particular about Trulia's implementation of the InfoWindow is: Extends beyond the map border: Google Maps InfoWindows are contained within the map border whereas Trulia's seems to be able to float on-top of the map Always displays InfoWindow n...

jQuery autocomplete: how to split the string result?

I have the following situation with an autocomplete plugin on an .aspx page. It is working fine. The result from the autocomplete search yields a product id and a product description is concatenated with it (i.e. 2099 -- A Product). I know that I need to use split() with this but where do I put it? I'm still rather new to jQuery and java...

jquery-infinite-carousel - jump 3 items instead of one

Successfully used jquery-infinite-carousel in the past but for my current project I need it to loop forever AND also jump 3 items at a time. Example of how it works jumping 1 at a time here. jQuery.fn.carousel = function(previous, next, options){ var sliderList = jQuery(this).children()[0]; if (sliderList) { var increment = jQuery(...

jQuery "Autocomplete" plugin is messing up the order of my data

I'm using Jorn Zaefferer's Autocomplete plugin on a couple of different pages. In both instances, the order of displayed strings is a little bit messed up. Example 1: array of strings: basically they are in alphabetical order except for General Knowledge which has been pushed to the top: General Knowledge,Art and Design,Business Stud...

JQuery: How to find what is between two text points

Hello, Let's say I have this: <div id="wrapper"> <pre class="highlight"> $(function(){ // hide all links except for the first $('ul.child:not(:first)').hide(); $("a.slide:first").css("background-color","#FF9900"); /* The comment goes here. */ </pre> </div> With Jquery, I want to find what is in be...

JQuery chained filter dropdown

Hi, I'm trying to implement chained filter dropdown using just javascript - jquery. The solution I need is http://www.codeassembly.com/Simple-chained-combobox-plugin-for-jQuery. However I can't use this solution as it depends on a PHP file. Are there ways to implement this solely using javascript (client and/or serverside)? Many Tha...

Simulating Ajax failures for QA testing

Our first ASP.Net MVC/jQuery product is about to go to QA, and we're looking for a way for our QA guys to easily be able to simulate bad Ajax requests (without modifying the application code). A typical integration/UI test plan might be: Load page, click button "DoStuff" "DoStuff" fails Attempt button "DoStuff" again "DoStuff" succe...

How to correctly add the .scrollTo plugin?

I have this script, running on a links list: $('li#linkcat-25 a').bind('click', function (e) { e.preventDefault(); $('#preview').load($(this).attr('href')); $('#loading').show('fast'); $('#preview').hide('fast'); $('#preview').show('fast'); $('#loading').hide('fast'); }); How can I easly add a .scrollTo effect,...

Possible to fire asp.net validation from jQuery?

I have a form with several text boxes on it. I only want to accept floats, but it is likely that users will enter a dollar sign. I'm using the following code to remove dollar signs and validate the content: jQuery: $("#<%= tb.ClientID %>").change(function() { var ctrl = $("#<%= tb.ClientID %>"); ...

one document.createElement, append it twice, only shows once

I have a button I want to use in the beginning and the end of the page: var button_save = document.createElement('button'); $("#compteurs").append(button_save); [...] $("#compteurs").append(button_save); but it only appear at the end of the page. If I remove it from the bottom of the page, it appear at the begining of page. It's a kin...

jQuery.ui.draggable.js and jQuery.ui.widget.js conflict

hello I had a working application, which uses a jquery ui dialog. I wanted to make the dialog draggable. As far as I know the only thing needed is the jquery.ui.draggable.js script. So I added it to the scripts I am using, but know I get the following error (as shown in the firebug console): base is not a constructor The relevante line ...

IE 8: Object Expected for Every Javascript Function

Hi; Moz say's everything is ok! IE say's object expected everywhere.. for example this my make a box function (in all.js file); function kutuyap(Eid,iduzan,text,yer,ekle){ var div; if (document.createElement && (div = document.createElement('div'))) { div.name = div.id = Eid+iduzan; document.getElementById(yer).appendChild(div);...

accessing embedded object with jquery not working in firefox 3.6

Hi, this code in my plugin used to work just fine: jQuery('#embedded_obj', context).get(0).getVersion(); and the html... <object id="embedded_obj" type="application/x-versionchecker-1.0.0.1"></object> Basically trying to get the properties from an embedded object. But it looks like get(0) is returning an html object instead of th...

jQuery function in .click() etc

Hi all. So normally, I do it like this: $('#selectRoom a').click( function(e) { e.preventDefault(); // To prevent the default behavior (following the link or adding # to URL) // Do some function specific logic here }); However, I would like to do it like this, to clean things up (and be able to reuse): $('#selectRoom a').click( sel...

Javascript Instance Variable Syntax (AJAX page refresh)

I'm having difficulty with Javascript instance variables. I'm trying to make an easy way to refresh the chat page, looking for new messages. The AJAX call supplies a mid, or the lowest message id to be returned. This allows the call to only ask for the most recent messages, instead of all of them. MessageRefresher.prototype._latest_mid;...