jquery

Display other form elements based on radio selection

Hello, I'm trying to display a specific block of html with some form elements based on whatever is selected in a radio button. Below is the framework of what I have, I didn't include any of the JQUERY that I tried because I couldn't get anything to work. Any chance someone could help me fill in the blanks? TIA! <script type="text/jav...

Jquery html attribute : How to exclude an element's child's html from that element's html.

Code snippet : <div id="some_text"> <p>some text</p> <div id="child"> <p>some other text</p> </div> </div How can I only get "<p>some text</p>"? ...

iframe swfObject load problems

I'm clicking on a link within an iframe and loading an html file into a div in the parent window, using jquery. This does load the content into the div in the parent window (I'm using top.document to refer to it), but part of that html file is loading swfobject with a new variable, to play a different swf. It works fine all on one page...

jQuery: Count Number of Inputs with a Specific Value

I need to count the number of text inputs with a value of 1. I have tried the following but with no luck. $('.class[value="1"]').length $('.class:contains("1")').length Using $('.class[value="1"]') technically works, however, if the values in the text input are changed after load, it still counts it as its default load value. I too...

Can the Dialog X be disabled from jquery UI 1.7 dialog boxes?

Hi When a dialog box pops up there is a "X" in the top right hand corner. I am wondering if there is an option to disable this? Thanks ...

radio button jquery ie6 problem

i am dynamically creating radio using jquery as shown belown. but they value only selected in ff,ie8. ie6,ie7 not selecting the values. how can i select the radio button value in ie6/7. rand=$("<input type='radio' ></input>"); rand.attr("checked","checked"); $(document).append(rand); ...

Images on Hover

I have an issue best shown by example: http://dont.net/DesigningIntro/index.html Here the last "Car Exterior" is opened fully, but not properly opens as like other small bars. It gets hidden while hovering on other links. I want it to be shown, and not get hidden even if I hover on other tabs. Any suggestions? ...

better way to create dynamic iframes in jQuery?

So I have the following code which is doing a setInterval until the iframe is available to be written to. $( '#testdiv').append( $('<iframe id="testiframe"/>') ); var t = setInterval(function(){ if(document.getElementById('testiframe') !== 'undefined'){ clearInterval(t); $('#testiframe').contents().find('body').append('asd'); } }...

jquery $.post function call order

In the following jquery function, can someone explain to me why "second" is being executed before "first"? I assume that the entire $.post request should be completed before the browser moves on to the next line of code, but that does not appear to be happening. function getGUID () { $.post(getGUIDScript, function(data, textStatus) { ...

Why is my jQuery plugin for removing text on focus and re-adding it on blur not working?

I would like the text in the value field of a text box to disappear when that text box gains focus, and then reappear in response to the eventual blur event - but only if the value is empty (that is, if the user hasn't entered anything after putting focus into the text box). So far, I have this: this.each(function() { obj = $(this...

Checking if a form field is numeric while using Jquery to get its value

Basically, I'm doing this: var phone = $("#phone").val(); Then I want to check if: 1) Phone contains only numbers 2) Phone contains at least 10 digits But the problem is, from my experience, using $("something").val() returns it as a string so isNaN() fails. But I don't want use parseInt() either since it will change strings into ...

Problems with my jQuery ... items are disappearing ...

I have the following code: <div id="comments"> <h2> Comments</h2> <div id="comment"> </div> <% foreach (var comment in this.Model.Topic.TopicComments.OrderBy(tc => tc.CreatedDate).Reverse()) { %> <% this.Html.RenderPartial("TopicComment", comment); %> <% } %> <fieldset> <% using (Ajax.B...

JavaScript/jQuery: How do I get an array of all attributes in an XML element?

Given an XML element in jQuery like so: $('<foo oy="vey" foo="bar" here="is" another="attribute" />') Can I use either jQuery or plain old JavaScript to get an array containing the names of all the attributes in an XML element? I would expect this: ['oy','foo','here','another'] ...

Ajax Result without returning View

I have a method set up that uses jquery form for a file upload - after the upload I wanted to update a layer. Here is my code... The problem is that the method is a JsonResult, and I can't figure out how to invoke the updating of another part of the page after it runs. Any suggestions? <%@ Control Language="C#" Inherits="System.We...

Drag and drop sorting of table columns with jQuery

I'm using jQuery to drive my AJAX UI. I have a table of data, and I want to allow the user to reorder the columns in the table by dragging and dropping them. I'd like the user to be able to grab the header for a column and move it. The row of data underneath should follow. Note that I'm not interested in sorting the data or in reordering...

Creating DOM structure using jQuery for unit testing

Hi all: Suppose I have the following html: var testString = ' <span id='id'> <div> <table> <span id='anotherId' class='NODE customContext' name='2'></span> </table> </div> </span>' and I want to convert it to a DOM structure using jQuery (under the assumption that jQuery is the best option to handl...

Need marquee text but in which we can stop on mouseover

Can you please send it to me in jquery? ...

Triggering jQuery event when 3 specific elements are visible

Here's to hoping this makes sense. I'm testing a new version of my personal site at http://joshuacody.net/jc3/ I'm looking to display my works in a bit of an interactive style, using jQuery. You can see that each image is mis-matched, but it has a rotator. And you can rotate each image to line all three up. When all three are lined u...

jQuery cycle plugin with transparency in IE

After much searching I managed to find these two Cycle plugin options to allow for transparency in Internet Explorer cleartype: true, cleartypeNoBg: true, The problem I'm getting now is a black block thing around the image that appears during the bounce transition than gets removed once the transition is complete and the image is sittin...

How do I implement simulated frames in ASP.NET MVC?

How do I implement a simulated frameset in ASP.NET MVC without running afoul of browser differences? If possible, I would like a header and two vertical panes. The header will be pinned to the top of the browser. The left pane will contain an index of some sort, and the right frame will contain content. Each of these panes can have i...