jquery

Loading Content and Appending Styles

I know this can't be done with iFrames or the default jQuery load function, so I'm looking for a 'workaround' or concept that would work better. We have to load an iframe to display a checkout process (long story) and the iFrame content is too wide. Without making it scroll, is there a way to hide some of the content or resize the inner...

Need some help getting a pdf export to work properly

I'm using a 3rd party tool (TCPDF) to export data to PDF. If I use a form and post the data to the export php page it works fine. However, I have another need to call the same exporter page and pass it the params it needs via ajax to output the pdf file that way. Everything seems to be working fine, except when I get the output for th...

How to remove literals from input mask after form submit?

I'm using Josh Bush's MaskedInput plugin for jQuery in an ASP.NET 3.5 Webform app. How to get rid from the literals in the code-behind file after form submit? E.g: a phone input with the mask $("#txtPhone").mask("(99)9999-9999"); In the code-behind: string customerPhone = txtPhone.Text Which returns me: (12)3456-7890 But this is w...

jQuery keypress() event listener problem

I am trying to execute a function every time a field changes. Just to get started, I am using a simple textarea and a div: <div id="text"></div> <textarea id="stuff"></textarea> <script type="text/javascript"> $("#stuff").keypress(function () { $("#text").text($("#stuff").val()); }); </script> This works, but it is al...

How do i make it so that a checkbox is not affected by a jquery bind function?

I have a jquery function that binds all tr's with the class item to a click function that will redirect to another page. inside this tr though is a checkbox. How can i allow this checkbox to function correctly instead of acting on the tr's click function? ...

jquery/javascript concat question

I want to create a jQuery statement that looks like this: $('.total_999').html("something"); However, 999 comes from variable called storeNo. How can I construct this statement dynamically? ...

How do I select a child element by ID with jQuery?

I'm having trouble selecting the text inside a span element that resides in another container. The situation I'm trying to solve is on the page we might have 10-15 different addresses at a time (so I'm appending a record Id onto the div's ID when the page is created). I need to be able to select a specific one by an ID, and then find t...

How to track user time on site

Hey, I'm looking to track users average time on a website (in the same way that Google analytics does) for internal administration. What's the easiest way to do this? ...

jquery click event not firing... but if I put an alert box in it does...? event bubbling problem?

This is a strange problem. I have two html pop-up windows, just hidden divs that I make visible by removing a css class. One is launched from from the main page, the second is launched from the div that I make visible. This all works great. Then when I try to close them I do this: (from game_ui.js) setUpPopUp: function() { ...

Add site icons to links using Jquery

Hi, I have just tested this Jquery script with my site http://cool-javascripts.com/jquery/add-icons-to-your-links-automatically-using-jquery-css.html At present the script creates a default icon for external sites. It would be great to have custom icons for different external sites like Twitter, facebook, and youtube, but I am struglin...

Selecting the same item with jQuery multiple times vs using a variable.

Which of the following would theoretically be better with performance and / or memory? In other words, does jQuery have to do work to select the same item multiple times or does it know what items it has selected in the past? I've intentionally left animate with no arguments, this is a purely theoretical question. $("#someelement").ani...

Jquery included multiple times

Possible Duplicate: Prevent jQuery multiple reference sometimes when having jquery loaded on the page, the client will include jQuery which then breaks the plugins that have been included before. How do I stop the second jquery from loading in the page. ...

Mixing a textfield input with a select input in html

My employer has asked me how to mix the functionality of a textfield input with a select input, "kinda like gmail does when you start typing the address of someone you've already written to, it allows you to choose the person and also to keep writing if it isn't in the database". How is this done? I imagine there's a javascript/jquery...

full HTML of object returned by jQuery selector

given this html: <li id="the_list_item"><img src="some_img"></li> and this selectior: $("#the_list_item") I want to get the full html from the object return by the jQuery selector. Using: $("#the_list_item").html() ...just gives me the inner html (the <img src="some_img"> part) But since: $("#the_list_item").attr("id") give...

Can jquery UI draggable be "position-aware" of other elements?

I'm implementing jquery UI draggable and have 2 of these draggables that you see on the linked page. They're of course draggable, so I can move them around as needed. How would I make them aware of each other though, so that I could try to make them align or show alignment marks when while being dragged, they get to the same x or y as ...

jQuery - Click on LI, show/hide UL - Click on LI:a href, continue to show UL and open in Blank Window

Hello all, Thanks to the wonderful contributors here at SO! jQuery is much cooler when you begin to understand it. :) So I have an LI that when clicked shows/hides a child UL. What I would like to do is have the ability to click on an link inside the LI that opens a blank window, but also doesn't close the child UL. The blank window ope...

Jackson (JSON) throws JsonMappingException when Float is null

Hi I am using Spring (with Jackson) and jQuery to pass a form as an object. My pojo includes nullable floats. However, when the fields are empty, Jackson throws an Exeption: org.codehaus.jackson.map.JsonMappingException: Can not construct instance of java.lang.Float from String value '': not a valid double value What do I have to do ...

jQuery - anchor click

Hi, I've got a working a.click() function in jquery... But if I click an anchor, I open an new window... But how can I stop the browser from opening a new window itself?? example: $('a').each(function() { $(this).click(function(e) { if($(this).attr('target') == '_popup') { //here is ...

Add repeating increment action to "buttons" at the ends of a jQuery slider. Needs to work on iPhone.

I have a web app that uses a lot of jQuery sliders. All are bound to input elements with the function below. This is working very nicely except on the iPhone. From what I've seen so far in discussions here and elsewhere there are no good solutions currently available to make the sliders work nicely. As a workaround, I want to bind a...

jQuery element in a div and clicking area.

Hey. I have a big DIV called #bigDiv. In this div I have other elements like menus and images. I want jQuery to toggle the #bigDiv every time user clicks the #bigDiv NOT other elements (which are parts of this div). How to do this? For example: index.html: <div id="bigDiv"> <ul> <li><a href="site">Site</a></li> </ul> jQuery: $("#...