jquery

Moving a large set of HTML objects on the page and rebinding events with jQuery

I have a DIV with many elements that are all clickable. Each one with it's own unique event. This DIV has a "docked" mode where it shows in some other place and layout on the page, when the mode is toggled. I have to note that my main target browser is IE8. Many of the problems I'm facing here (SSSLLLLLOOOOWWWWW) just go away when I ...

Change property of a Jquery object?

I'm using a Facebook-like autocomplete jquery library found at: http://otisbean.com/dropbox/jquery.tokeninput.js In my own html code, I have the following which works fine <script type="text/javascript" language="javascript"> $(document).ready(function() { $("#my_input_field").tokenInput("http://mysite.com/cha...

jquery, array , html , append

Hi, I want to take "div" s and and this html in "li" . This is my HTML code: <ul class="NewContent"> </ul> <div class="test"> <span>Text1</span> </div> <div class="test"> <span>Text2</span> </div> and jquery (not sure if it is ok started): <script type="text/javascrip...

can we use JQuery validations in partial view user control in ASP.NET MVC?

Hi I have controls like Textbox, dropdown on my CustomerDetails.ascx partialview. Now can we do JQuery validations on the user controls. In the MainView, we use code like this. <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Mvc.Master" Inherits="System.Web.Mvc.ViewPage>" %> //JQuery validations C...

jQuery textbox.val('xxxx') not causing change to fire?

I have the following jQuery code in place on my page: var isChanged = false; $(document).ready(function() { $('.change').change(function() { isChanged = true; }); }); I am using a plugic that modifies the value of the text box it is linked to using: target.val('xxxx'); the text box in the html (from asp.net) is: <i...

Help with Jquery editor

Hi guys, I am using the Jhtml text editor(jHtmlArea-0.6.0.js) Downloaded from the site(http://jhtmlarea.codeplex.com/). I have made some custom changes like adding more events to it. TEven after that, sometimes after adding text/content the events(onchange,onblur....) does not get triggered and the user looses the content when he tries...

jQuery removeClass based on ID?

So right now I'm doing this: $(".radio_visible").hide().removeClass("radio_visible"); But what I'd like to be able to do is remove all of the radio_visible classes if it's within a specific ID. Sort of like this: $(".radio_visible").hide().removeClass("#payment_fields .radio_visible"); So is there another jQuery function I should b...

JS/jQuery Image Editor

Hello, has anyone stumbled upon image editor done either in pure JS, or jQuery - that kind like CKEditor has? I'm looking for piece of code, that adds handles to image, so you can resize it, or even drag image around, as you wish. Thank you. Edit: rephrased. ...

Jquery $.ajax callback not being called in ASP.NET MVC View Page

I have a simple ajax call: $.ajax({url: my_url_here, dataType: 'text', success: function(data, textStatus) { if(textStatus == "success") { alert('success'); } else { alert('fail'); } }, error: function(XMLHttpRequest, textStatus, ...

JQuery validation problem with Textbox naming on ASP.NET MVC page?

Hi I have two Textbox controls on my view. Here JQuery validation function is working when the name is one word. It is not working when the name is having any dots in it. In the below JQuery fucntion, if i use "lastname" textbox id for validation, it is not allowing any other keys except digits. But somehow if i use "AddressDetail.ZipC...

Image Hidden, then on mouse movement Fade-In, Fade-Out and Fade-In again.

I am trying to get an image to fade out when there has been no mouse action for 3 seconds and then fades in when the mouse is again moved. I would also be appreciative if anyone could tell me how I can make the image be hidden until the mouse moves. So when the page loads up you don't see the image until the mouse moves. This is what I...

mouseover and addClass jQuery example

Hi there, here's a gimme for anyone that knows jQuery: I have a navigation <ul class="nav"> I want to change around. I'm basically looking for the a:hover effect, just faded in (I'm using sprites, and going from one sprite area to the next). The code I have in my header looks like this: $(document).ready(function(){ $(".nav li").mou...

Storing Hidden Values in HTML (for tooltip, error, defaults) Best Practices

I just saw this JQuery Metadata Plugin by John Resig, Yehuda Katz, Jarn Zaefferer, and Paul McLanahan, in my search for JQuery Form Validation, and that's an interesting idea! I'm wondering what general best practices are for storing things like error/validation text, tooltip text, default value text, etc. I know you can place them int...

How do I get the name or id of the element ?? Jquery

How do I get the name or id of the element to jquery ...

jQuery slideToggle: Hiccups after sliding up in IE 8

I am using the jQuery slideToggle() function to show and hide a span. Here is my code: $(".slideButton") .click(function(event) { $(".slideText").slideToggle("slow"); event.preventDefault(); }); <span class="slideText" style="display:none"> blah...blah...blah </span> <a href="" class="slideButton">more...</a> It works ...

jQuery mouseleave bugs with animated elements

Hi, I have bumped into a weird issue. jQuery 1.4.1 mouseenter/mouseleave events fire up correctly if the mouse is being moved, not a big deal. However, it bugs in some browsers when the cursor itself remains static but the element is being moved away by animate(). So imagine the code like this: jQuery('somelement').bind( { mouseent...

[jQuery] webkit browsers are getting elements.width() wrong

I am trying to get the correct calculated width of an container. All the browsers are getting the calculated width correctly. (even IE) but surprisingly Chrome and webKit browsers are getting a wired number. I am trying to get the total width of the <li> including its border and padding + its margin-right. Then multiply that by the len...

jQuery does not .focus

I have a jQuery toggle div that appears onclick of the link. <p><a id="slick-toggle1" href="#">Yes, enroll me today!</a></p> <div id="login"> <!--#include virtual="LoginPopup.asp"--> </div> in LoginPopup.asp i can not get the focus to go to the first field of username $(document).ready(function() { $('#slickbox1').hide(); $...

JQuery validator plugin problem on update button click on ASP.NET MVC Page

Hi I am using JQuery validator plugin on ASP.NET MVC Page as below. 1). Here on update button click, Validation messages are displaying fine. 2). Zipcode Min length is 5 and max is 9 and is a required field and only digits. The problem is even if we enter more than 9 digits, it is displaying the validatin message and but updating it ...

How to implement dynamic taxonomy navigation / hierarchical drop down list using ajax/jQuery?

I'd like to provide my users a way to navigate a taxonomy by successively drill down ono drop down lists. A simple example would be something like ebay's categories. Say you pick the category "Clothing", the next drop down list would display all the sub-categories under Clothing such as "Shorts", "Pants", "Coats" etc. And this can go on...