jquery

Filter other Select Options when an option is selected

This is a problem I'm having in actionscript, but just as easily applies to Javascript or Jquery. Basically, I have 3 select boxes, e.g.: <select id="color"> <option>Red</option> <option>Blue</option> <option>Green</option> </select> <select id="size"> <option>1</option> <option>2</option> <option>3</option> </select> <select id=...

How might I gain write access to outer objects from a jQuery AJAX callback method?

Your help would be very much appreciated. I do not understand why the following jQuery code does not work: function saveChanges(obj, n, id) { var t = "content to send to server"; $.post("http://localhost:8080/Content.do?method=update",{ value: t, key: id },function(result){ alert(result); //WORKS alert("INNER"+$(...

jQuery Selectbox Append Options OnChange

Hi. I'm working with jQuery and a plugin called jQuery.SelectBox I have 3 selectboxes, selecting an option in the first selectbox will change the options in the second one. My problem comes when I try to insert values in the second selectbox via append function in jQuery. Everything works fine but the new options are not clickable. ...

How to make bigger slides with AnythingSlider (jquery plugin) ?

Hello! I've followed the instructions on the website of Anything slider (http://css-tricks.com/anythingslider-jquery-plugin/), about customizing, but when I add width, I have slides dissapear or blank slides. Any help will be much apprecied. ...

pngfix jquery, with images

I use pngfix from jquery : http://jquery.andreaseberhard.de/pngFix/ Everything it's ok, but i have one big problem. When I turn pngfix, in IE6 .png it is transparent, but images's with are changing , They become bigger. I don't know why ?? And it just in IE6 , in other browsers it is okei. How Can I fix it ??? Thank You ! ...

jquery sortable handle IE vs Firefox

i'm trying to use jquery to implement a portlet/widget style interface, with 3 columns and drag and drop within and between them. it's working almost completely, except for the following little bug. the portlets have a header, h2, that i've set as the handle in my sortable options. in firefox and chrome, this is working exactly as exp...

Problem using jQuery .live() events in a widget in FF3

I am creating a simple jQuery widget and have the following two lines in the _init() method. this.element.find("li.thumb img").css("cursor", "pointer"); this.element.find("li.thumb img").live("click", function() { alert(); }); The addition of the style property in the first line works in both IE7 and FF3. However, the binding of the e...

Jquery IE6 IE7 hide and show bugs

I did a code in jquery and ajax with working very well in Safari, FF and IE8, but dont work in IE6. He can 5 Group of forms editable, which should not be showing, but only the first works, the ajax is also not working in IE6 and IE7. scintillation only put in 2, but is 5 how can you see the link below. $(document).ready(function(){ ...

jquery lose focus event

Hello, I'm trying to show up a container if a input field gets the focus and - that's the actual problem - hide the container if focus is lost. Is there an opposite event for jQuery's focus? Some example code: <input type="text" value="" name="filter" id="filter"/> <div id="options">some cool options</div> <script type="text/javascr...

Anyone care to review this JS code for a custom scroller?

Hi Guys I'm by no means a programmer... I've never really taken a comp sci class, don't know much theory, but I still hack together code that usually works. I just don't know how ugly it actually is. I recently wrote this (simple) bit of JS and was wondering I could get some feedback on it... If this isn't an appropriate place for i...

jQuery click off element event

I have a floating div that gets displayed, and I want it to be hidden when the user clicks off the div. This would be similar to the .hover() funtion callback when hovering off an element. Only I want to do this for click. I tried just setting a click event for the body, which would hide the div, but that gave unexpected results. Any...

Post with jQuery AJAX to ASP.NET MVC 1.0

I'm doing a jQuery AJAX post like this: var form = $("#formid"); form.submit(function() { $.ajax( { type: "POST", url: form.attr("action"), // points to NewClient data: form.serialize(), success: function(msg) { alert('ok ' + msg); }, error: function(req, status, err) { alert('err=' + er...

jquery ajax call

I have a question about displaying results using ajax. I have part of the code below. $.ajax({ type: "POST", url: "Service.asmx/GetMethod", data: '{ "field": ' + id, contentType: "application/json; charset=utf-8", dataType: "json", success: function(results) { var html = results.d[0]; $(contentEl...

Is it bad practice to return partial views that contain javascript?

Hi all, The replies in this post sound very convincing, however, this post is just over my head and was hoping for some help: I have code in my partial view that looks like this: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> <div class="messageBox1"></div> <% Html.BeginForm("BusinessAdd", "Home", FormMethod....

JQuery h2 selector issue

I am having issues getting my JQuery Selector to access a particular HTML element. I have an <h2> tag which I am trying to remove the css class from and then add a new one to it based on some user action. My h2 css is defined as: html .image_thumb ul li h2 { color : #ffffff; font-size: 1.5em; margin: 5px 0; padding: 0; }...

Get a class name by knowing part of it's name when it's not the only class applied to an element.

Hello, I'm looking for a way using jquery/javascript to get a class name when I only know part of it and there are more than one classes applied to that element. So if I'm looking for a class that I know starts with "charLimit_" I want to know that full class name even when it's not the only class applied to a given element. Example HTM...

jQuery: Trouble Traversing

I have tried to find some decent documentation on traversing in jQuery, but have not found a decent resource, any suggestions would be much appreciated. I am trying to create a simple animation for a menu. I have a simple menu: <ul class='contentNav'> <li><a href='#'>One</a> <li><a href='#'>Two</a> <li><a href='#'>Three</a> <li>...

jquery + Simplemodal onshow method only executes once

I would like to execute a function when Simplemodal opens a window, and have populated the 'onShow' field with a callback function. In the example below I have simply filled it with an alert note, ie each time the simplemodal window is opened the alert should fire However, it appears this is only being executed once. If the modal is ope...

Removing active class and adding it to a sibling

Currently, I have a jQuery Cycle plugin that allows the image to scroll. With it's callback I am calling this function function onAfterVideoScroll() { $('.myRemote.active').removeClass("active").next().addClass("active"); } This SHOULD be removing the current class from another set of links, and adding the class to the it's next sib...

jqGrid: Is it possible to commit a cell change when tabbing off instead of pressing Enter?

I have a simple in-line edit in my grid, and I want to commit the change when the user tabs off the textbox. The default behavior of jqGrid forces the user to press 'Enter' to commit the change, but this is non-intuitive for our users. onSelectRow: function(id) { $(gridCoreGroups).editRow(id, true, undefined, function(res...