jquery

jQuery: Bind ajaxForm to a form on a page loaded via .load()

Hi, I'm using the ajaxForm plugin for jQuery to submit forms on my webapp. However, in one part of the app, I'm loading some content thathas a form on it via jQuery's .load() The problem lies in that I can't get ajaxForm to bind to the form loaded via ajax. I've tried this code to no avail: $('#viewRecordBtn').live('click', functio...

Get ASPNET Control Value Using jQuery and Update Panel

I have an asp.net button and an asp.net label in an update panel and when I click the button it updates the text of the label in the code behind. However when I try to get the updated value it just returns an empty value. How do I get the updated value after the asynchronous postback has completed. I have included my code below. Many ...

jQuery Sortable() with original position placeholder?

Is there any way to have a jQuery sortable list show a placeholder for where the initial item was when you drag one out to sort? i.e. when a user goes to move one of the LIs in my list, I want a rectangle outline to show where the one they're dragging came from. ...

Is it a Best Practice to separate css and JavaScript logic on JQuery Plugins?

We are starting to contribute to the JQuery libraries with some useful plugins that we are using in our web sites. We want to make sure that we cover the basics best practice towards the creation of plugins. My idea (which I don't know if this is a best practice or not), is to keep separate any styling from the actual logic of the Plu...

How to pass local variable from Jquery function to ASP.NET MVC controller?

Hi I have a local variable called mode in JQuery function. Based on the radiobutton selection, this variable value is set in JQuery function. Now i want to access this value in COntroller? How can we do this. $(':radio').click(function() { var mode = this.value; }); Now How can I access this mode variable in my controller method. ...

jQuery: remove class once element is clicked

Hello. I am stuck on a little jQuery problem. I have a collection of links (more than 50) generated from a php loop. When a user clicks on a link, the jQuery load event is called, and a php/mysql script (called page.php in the example below) is loaded into an empty div on the page. I would like the class (".classy") to removed from the ...

how to change zIndex .dragndrop question

first, have to look at this dragndrop (http://code.google.com/p/jquery-drag-and-drop/) what i want to ask is , isit possible to add a ACTIVE "window" onClick??? example: i got 3 window dragable, name drag1 , drag2 and drag3 drag1 zIndex="98" drag2 zIndex="99" drag3 zIndex="100" when i click on the drag1, change the drag1 zIndex va...

Identifying li tags

Hi, I have three li tags and each has a unique Id and I am trying to associate each with a different image. On hover, on a given li the image for that li will be shown by appending the image to a div. Let us say there was no unique id .... is it possible to associate a different images with each li tag ? Any ideas ? <script type="...

Another IE jQuery AJAX/post problem..

OK so i have this website, http://www.leinstein.dk. You will see "Hello World!" This is from ok.php, ive made a script that refreshes ok.php after 10 seconds. Anyways, This does not show in IE. I dont know why, and i hope you can help me out. Here's My script: function ajax_update() { cache: false /* var wrapperId = '#wtf'; */...

jQuery slide down from first comment to full page

I have a list of 10 comments on a page. Their heights are not known because it depends on the content of the comments. What would be the best way to only show the first comment until you click a button, at which point it slides down to reveal all 10 comments in the page? So by default, the user would only see one comment, until he clic...

JQuery functions .addClass(), .attr() and .find() not working in IE7, need workaround

I'm building a table and trying to add some CSS as well as some attributes. I can't seem to find any workarounds for IE7. Here is what I'm doing: $.each(eat,function() { //Builds tablerows var row = document.createElement("tr"); var cellReportId = document.createElement("td"); cellReportId.appendChild(document.createTextNode(this.r...

jQuery-UI draggable stack and handle together

$(function() { $("#set div").draggable({ stack: { group: '#set div', min: 1 } handle: 'p.handler2' }); }); anywhere wrong? ...

jQuery beginner - referencing HTML object passed into JS function

It seems like there should be a better way to code this: HTML snippet: <label onclick="addstuff(this)" id="label_id">Hello</label> JS/jQuery snippet: function addstuff(field){ $('#'+field.id).before('<div>Just a random element being added…</div>'); } I dislike that I am referencing my field in the Javascript by $('#'+field.id)...

Changing background images, Jquery + CSS

Hi all, I am working on a clients website and want the background images on the "cruise_offers" div to change, possibly only 3 - 4 images in rotation. My jquery knowledge is quite basic so any help would be great. I would prefer it to work with jQuery as I am using it elsewhere on the site. My markup: <div class="cruise_offers"> ...

jQuery Dialog Button Click failing in IE

This has me stumped. I have a page with jQueryUI tabs. Each tab is populated via ajax. On the fourth tab a user can click a button which brings up a modal dialog. The dialog is a form that accepts user input, posts the form via ajax, closes the dialog, then updates the page with the new data. I use custom buttons in the dialog instead o...

JQuery How to find out what the ajax error is?

I have the following bit of code which I'm just trying out by running in firebug $.ajax({ type:"POST", url:"http://mpdomain/WebService.asmx/Operation", data: "{'parameter1': '44906'}", contentType: "application/json;charset=utf-8", dataType: "json", success: function(data) { alert("succsess") }, error: function(e, ts, et)...

How to show html tags converted by PHP's htmlentities into div using jQuery?

I have a dynamic string from PHP that I encoded using htmlentities() so I can pass it on AJAX using jQuery and JSON. Now I got something like { "error": "false", "html": "&lt;div id=&quot;user_add_title&quot;&gt;Adding New User&lt;div class=&quot;showhide-div&quot;&gt;&lt;a class=&quot;hideShowToggle&quot; href=&quot;#&quot; onclick=&qu...

Jquery and sIFR link management

Ok, I'm using Jquery to build a dynamic menu, and sIFR to change the text to TrajanPro font. This does not mix. I want to find a way to make it mix, though. sIFR has automatic parsing of links, so that Flash sends you to the link location. What it doesn't do is pass on javascript triggers. I'm trying to make my menu as accessible as po...

How can I make pretty scrollbars using HTML/CSS/JScrollPane

I am designing an html web page that mimics inline panes by defining this css class: .paneSection{ display: block; border-width: 1px; border-style: solid; margin: 2px; padding:0px; height:200px; width:200px; overflow: auto } and applying to a span tag. The resulting code is something like this: <table> <tr valign=...

Jquery Cookbook Modal button

I've been at this for two days and can't seem to get it. Basically, I'm using the JQuery Cookbook modal from scratch. My problem is the form html page loads fine but the code will not recognize my submit button. Here's the relevant parts of the code: Separate HTML: <div id="contact"> <form action="" id="register_form" method="post"> ...