jquery

jQuery - Select empty input with class name

How to select empty all 'input type="text"' elements with class name 'myTextbox" example below only selects empty fields var emptyfields = $("input[value=]"); ...

C#/WPF: Display Images like a LightBox in jQuery?

Hello, Did anyone ever try to create a jQuery "LightBox"-Like "Popup" (WPF UserControl) for displaying Images? See this page for an example: http://www.huddletogether.com/projects/lightbox2/ Thanks! ...

How to apply css property using javascript?

I have the following structure of the code, if the height of UL exceed 270px, then i want to add the css property overflow-y:scroll; or else as it is. <ul class="tabs"> <li>Content</li> <li>Content</li> <li>Content</li> </ul> ...

JQuery, AJAX, PHP, XML; Image overlay script stops working on callback content.

A button click fires my function that fetches image data via an AJAX-call: $("#toggle_album").click(function () { album_id = $("#album_id").val(); $.post('backend/load_album_thumbnails.php', { id: album_id }, function(xml) { var status = $(xml).find("status").text(); var timestamp = $(xm...

ASP.NET MVC ControllerBase.Json() fails to generate valid JSON for NHibernate collections

I'm using return Json(whatever); inside an ASP.NET MVC Action to return data to my page via JSON. I'm using jQuery to perform the JSON request and subsequent interaction with DOM. when whatever contains NHibernate objects with collection members (i.e. contains ISet objects), the callback function is never invoked by jQuery. We're using...

New to jQuery, simple popup window script, any problems?

Still a little "gunshy" about jQuery. Does this simple popup window script look okay? Is my jQuery logic right? I have a few questions in the code comments that I'm curious about. $( document ).ready( function() { $( "a[target='popup']" ).click( function( event ) { var $href = $( this ).attr( 'href' ); // should I use "thi...

Cloning a css style from a style sheet using jquery/greasemonkey

I am writing a Greasemonkey script using jquery, and I want to add information from multiple pages, but the object i want to load is a div with an Id, is there any way I can retrieve the style information, so that I can apply it to the added sections? ...

How to reset a field when changing a date ui.datepicker.js [Solved]

Hi, I'm using ui.datepicker.js I have a form and when the date is changed I want that another field reset the status (this field is a dropdown select box). The case is the following: The user enter the latest billing date in the calendar (when he prepare a bill) and he select the status unpaid, when he will received the money he will...

How to make when we tick on checkbox and another input will fill up automatically

Form by example. $fullname = 'John Travolta'; <input type="text" name="fullname" /> <input name="same" type="checkbox" /> Tick if same name When we tick on the checkbox the input fullname will insert automatically by data from $fullname How to do that by javascript, jquery or etc ? ...

Prevent onclick action with jQuery

there are some links with onclick event actions <a href="#" onclick="alert('panic!')">Let's panic</a> <a href="#" onclick="alert('panic!')" disabled="disabled">I can't panic no more</a> I need prevent event actons execution on links with disabled attribute without removing onclick actions. $('a[disabled]').click(function(e){ e.sto...

File uploads not working within jQuery UI Dialog

So I have a rather odd issue that I wanted to see if anyone has some insight into. I have a page in which I display a grid of files that have been uploaded to our server. The toolbar for the grid provides them with the ability to upload more files. When they click the "Add File" button on the toolbar, a jQuery UI Dialog modal window ap...

Position An Injected DIV Using JQuery's "Load" Function

I'm pulling some info from a database then putting it into a DIV and injecting all that in to my page. The problem I have is positioning the newly injected DIV after it has finished loading. Here's my jQuery: $j(document).ready(function() { $('a#load-content').click(function(event) { event.preventDefault(); var productId...

Postback after JQuery Dialog box closes causes js error in IE

I am creating JQuery dialog boxes and need the close functionality to cause a postback to the parent form (so that data changed in the popup form displays immediately on the parent screen). I have the code written and the dialog box in place. However, there is an issue. In IE, when I close the popup and the postback occurs, I get this...

Hide/Show Div Effect - Ruby on Rails 2

What is the best way to create a hide and show effect in rails 2. Is it to use a JQuery type solution or is there something as good, better or easier built in? ...

Focus input field with JQuery without selecting current value text

$("#myinputfield").focus(); Doing that on an input field with it's value already set causes the current value to be selected. How can I focus the field without selecting the text? ...

ASP.NET MVC AJAX Problem

So I have a simple voting feature on my asp.net mvc page. My index page is loaded with all the posts in the database. A user can vote yes or no as to whether they liked the post or not via links within each post. So in my database I have a table called posts and there are two fields in that table named vote_yes and vote_no that track ...

How to use jQuery to FIND & REPLACE given text with a matching URL instead

Hey there, in short I'm looking to parse a web page and find the text "class abc" and create a url like this: http://www.site.com/code/documentation/classes/classabc/index.html I'm basically gonna create links from my hosted svn code website to documentation I've generated via doxygen from the same codebase. ...

jQuery image src attribute broken in IE7

I'm using jQuery (in an ASP.Net 2.0 website written in C#, FWIW) to handle a fairly simple div expansion and image swap (for display state indication) and it's working like a charm in FF 3.5.5 but failing in IE 7, and I'm wondering if you fine folks might be able to help me ascertain why that would be. I'm loading jQuery 1.3.2 from goog...

Is there a practical max number of rows for jQuery tablesorter?

I'm using the jQuery tablesorter plugin in a very simple way, to add sortability to the first four columns of a five column table. The maximum width of any of the columns is 255 characters, and most are narrower than that. This works just fine on smaller result sets, but if my table (based on a search query) grows over ~300 rows, there ...

Why is 'this' not updating to refer to a new object?

I'm writing an online game which allows a user to progress from one puzzle to the next, and if the user makes mistakes, each puzzle has a start again button to allow the user to start just that puzzle from scratch. A simplified version of the code's structure is below: function puzzle(generator) { this.init = function() { t...