jquery

How can I get jQuery validation to produce the same markup as server-side ASP .NET MVC validation?

I'm developing a web application using ASP .NET MVC 1.0 and jQuery (including the validation plugin). The server-side markup for a typical "edit entity" view is as follows <label for="FirstName">FirstName:</label> <%= Html.TextBox("FirstName", Model.FirstName) %> <%= Html.ValidationMessage("FirstName") %> When invalid data is posted t...

JQuery - add more than 1 comment doesnt work

By this code I add comments to a posts. But there is a problem - the first comment work, but i am not able to add next. I use livequery, so it shold work. Can you help me? $('form.comment_form').livequery('submit', function a() { var element = $(this); var wall_post_id = element.attr("id"); var wall_messag...

Is there any jquery version of IE7.js available?

I need jquery version of IE7.js or any other similar jquery based js for same thing? http://code.google.com/p/ie7-js/ ...

Accessing functions bound to event handlers with jQuery

With jQuery you can bind functions to an event triggered on a DOM object using .bind() or one of the event handler helper functions. jQuery have to store this internally somehow and I wonder if is it possible given a DOM object, to find out which events have been bound to the object, and access those functions etc. The desired return re...

Set focus on div contenteditable element

Hi all, I try to explain my problem, because I really need your help. I have a <div contenteditable=true> where I define by a WYSIWYG some elements. For example <p>,<h1>, etc. I would like to put directly the focus on one of this elements. For example on <p id="p_test">. But it seems that focus() function doesn't work on <div> eleme...

How to replace a symbol in an input value with jQuery?

I have generated inputs with price values. Example: input type="text" value="59,00" Now I should replace the , (comma) with a . (dot) with jQuery. I tried this but it does not work: $('#inputid[value~=,]').each(function(i){ $(this).text($(this).text().replace(',','.')) }); Could you help me ...

JQuery add id and values to textbox when adding row.

Hi all, I need to add a values (if anything coming into function when form is loading) and a sequential id (e.g. id="textbox_1" - id="textbox_2" etc..) to the textboxes inside an added row with jquery. To add id it would be as example for each time the function gets called, it would increase by one the end of the id of the textbox (e....

Drupal Dynamic Select on a Form

I'm sure this is an easy one for jQuery experts, but I'm a backend guy, and can't find the best way to do this. I have two arrays in Drupal, one is a list of names of views, and the other is an array that contains a list of displays for each view. Here's the code to populate the two arrays: //load list of views in to array for select...

prototype: keep an element in view upon scrolling

Hi coders, I'd like to keep a div element within the viewport when page is being scrolled. I'm currently using this snippet using jquery: $(function() { var offset = $("#column-menu").offset(); var topPadding = 25; $(window).scroll(function() { if ($(window).scrollTop() ...

Zend_Form jQuery slider

How to make jQuery slider with fixed maximum ... exact like this: http://jqueryui.com/demos/slider/#rangemin I manage to do it half way: $slider = new ZendX_JQuery_Form_Element_Slider('amount'); $slider->setLabel('Set Amount: '); $slider->setJQueryParams(array('min' => 0, 'max' => 60, 'value' => 15)); I don't know how to display the...

Replace special string characters in jquery

HI, I have some string from XML file, and I I want to replace all "& lt;, and & gt;" ... in "< and '>" this is the AJAX call (jQuery): $.ajax({ type: "GET", url: "xml.xml", dataType: "html", success: function(xml) { alert(xml); $(xml).find('reslult').each(function(){ ...

Does something like jQuery.toggle(boolean) exist?

I write something similar to the following code a lot. It basically toggles an element based on some condition. In the following made-up example, the condition is "If the agree checkbox is checked and the name field isn't empty". $("button").click(function() { if ($("#agree").is(":checked") && $("#name").val() != "" ) { $("#mydiv...

Netbeans JQuery Selector auto-complete

I can't get Netbeans to auto-complete my selectors for JQuery, example: <a id="hello" href="#">Hello</a> <script type="text/javascript"> $("|").hide(); </script> As far as i understand the documentation at this point it should show the tags available on the page when i press control+space at the | position, but instead displays no...

jQuery fade in ajax loaded div isn't smooth.

When running the following locally, the fade in is very smooth, but on a remote server the content loaded into the target div appears, is instantly hidden, and then fades back in again. Why does this happen and how do I fix it? My jQuery (inside the document.ready stuff) looks like this: $(".dataclick").click(function() { $('.clic...

When I include only the jQuery 1.4 Library, I get an exception, why?

I keep getting this error all over the place where I only have jquery 1.3 or 1.4 included. "setting a property that has only a getter" and a long list of warnings in the Firefox Error Console. What's going on? I can't find any information on this issue =/ <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/...

Minimalist, Tiny Javascript Template System?

I'm looking for a minimalist template system for javascript, ala John Resig's Javascript Micro Templating. The smaller the better, and if it's jquery based even better. Recommendations? I tried John's micro-templating but ran into a few issues, wanted to see if there are more baked / better packaged solutions out there. [Update] I trie...

jqGrid and jQuery.get()

Hi, I'm trying to populate a jqGrid from a jQuery.get() response and I'm having difficulty. I have my have table set up pretty simply and have been able to successfully call my servlet and return the xml through the following setup: $("#table_1").jqGrid({ datatype : 'xml', url : 'QueryServlet?param1=x', ... // the res...

JQuery Positioning Problem

Hello, I have been trying to create a menu panel with JQuery that can be seen here by clicking the Preview button on top: http://jsbin.com/amexi/edit Problem: If you hover over Link Two or Link Three, the black panel comes perfectly replacing the respective blue link, however if you hover the Link One, the black panel comes little be...

Help with jquery autocomplete and json response

I have the a ASP.NET 2.0 json web service that returns the following response <?xml version="1.0" encoding="utf-8" ?> <string xmlns="http://microsoft.com/webservices/"&gt;[{"CUName":"Raytown-Lee\u0027s Summit Comm CU","CUCity":"RAYTOWN","CUState":"MO","CUContractNo":"02406"},{"CUName":"Summit Credit Union","CUCity":"MADISON","CUStat...

jQuery Background Canvas transparency

Hi. I'm using the jQuery Background Canvas plugin and have created a DIV with rounded corners and a gradient effect. However, I'm unable to get the transparency to work. What am I doing wrong? Here's the JavaScript: $(document).ready(function() { $(".Test").backgroundCanvas(); $(".Test").makeElementTransparent("#CECFCE"); $(".Test").bac...