jquery

jquery error in IE6

my jquery code not run with IE6 but runs all others including IE7. It errors "JQuery is undefined" . my code is here ...

Problem with Checkbox label added by JQuery Clone Method

How do I specify label to Checkbox that is added thru the JQuery Clone(false) method and does not have a Unique id ? ...

Reaction on checkbox works only once. What is wrong?

Hello, I am making the form where checkbox controls view of the radiobuttons in the row with this checkbox. The problem that it works only once. Please advise what can be wrong. The code of the page is following: <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script ty...

Display past 4 survey results from JQuery.survey

I am making something for work. It is a highly repetitive task and it will be useful to fill out a small survey about the task that can be referred back to in the short term (like 5 minutes) I love the jquery.survey module. The survey looks great. Now I could use a hint or some help on getting the output from that survey to save for ...

preventDefault won't work on Firefox

I'm trying to prevent A HREF from actually opening the link, but to execute a script. I got the script part working, but it seems Firefox would just ignore this: $("#permalink a").click(function(id){ $("#newPost").fadeToggle; event.preventDefault(); var id = this.getAttribute('href'); $("#newPostContent").load(id); $("#newPost...

Script goes ghost when dynamic content is loaded

After loading a PHP template (using jQuery's load function), this simple script won't make the DIV go away: $("#trigger").click(function(event){ $("#removeThisDIV").hide(); The HTML bit: <p id="trigger">X</p> Tried to remove other DIVs, before the load -- it works just fine. After the load, the script went dead. Ideas? Thanks. ...

Get URL of selected element

Hi, I'm just getting started with jQuery and I want to get the url of a selected element so I can do something with it. To start with I'm just trying to get the url of a hovered link to show up in an alert. Can anyone tell me where I'm going wrong? $(function() { $("table#content > tbody > tr > td > a[href*=delete]").hover(funct...

How can I check my object type is Image ?

If I write something like this: var img = $(new Image()).attr('src', image.src); How can I check later if img var is an image and not something else ? ...

How to tell jQuery: When load is ready, show this?

This code: $("#permalink a").click(function(id){ var id = this.getAttribute('href'); $("#newPostContent").load(id, function() { $("#removeTrigger").click(function() { $("#removeThis").hideToggle(); $("#postSingle").hideToggle(); }); }); $("#postSingle").fadeToggle(); return false; }); Shows #postSingle before the load functi...

jQuery Modal not showing <script> tags with AJAX page request

I use a plug-in called nyroModal to call a page via AJAX and display it in a modal window. When the AJAX gets the page, it creates a div on the current page, when nyroModal then styles and creates the modal page for you. Problem is, it seems to strip off all the tags out of the requested page. Using firebug I can see the tags in the re...

Sorting items in Select with remember what is selected.

I wanted to sorting items in select, but all solution what I finded have selecting last item in select. And it's problem if you edit existing data in forms. How solve this? Please don't ask me, why I didn't sorting items at server side. ...

jQuery validation plugin and .Net WebForm not playing nicely in IE7, works in IE8

Hi all! Please bear with me. I've got the jQuery validation plugin working beautifully in FF, Opera, Safari and IE8. However, IE7 is giving me problems. Our back-end developer insisted on using .Net WebForm to create the form on the server (at least this is what I think she used, it's .aspx is about all I know - I can post some code if...

jQuery, escape characters when selecting by href

Hi, I'm trying to select an element based on its href within a table of records. I have two links for each record: 'reorder=+' and 'reorder=-' If I use a[href*=reorder] both elements are recognised successfully, however if I try to differentiate between the two, nothing happens eg: a[href*=reorder\=\+] Is there a way around th...

Asp.NET MVC Ajax-Post a FORM and Ajax-Get

Hi all, I'm stuck, who can help me out? In my LogOn.aspx View I've login controls (Username, Password, RememberMe) inside a FORM tag: <form id="loginform" method="post" action="/Account/LogOn/"> Below that, I've a hidden DIV with a OPTION dropdownlist and a confirm-button, with a onclick_event: $.ajaxSetup({ cache: false }); $.ajax(...

get one value two times with jquery

I have this code in jquery : $("#order_btn").click(function(){ var totalprice = $(".price_amount").text(); $("#totalprice").val(totalprice); }); When I submit this form with a hidden value i will get the totalprice value two times, if its 200000 i will get 200000200000. why ? <input type="hidden" value="" name...

validating start and end dates with jquery plugin: validation

hey all, i'm using bassistance jquery plugin validation and i have 2 textboxes for a start and end date. is there a way to setup a rule to say if either one is specified then require both fields, but the user can choose to leave both blank and that's ok? thanks, rodchar ...

Performance difference between jQuery's .live('click', fn) and .click(fn)

I love the new live event in jQuery 1.3. The question I have is the performance of this event. I know the advantages of using live over click/bind('click') but is there a performance hit for using it over click/bind('click')? If not, why would you ever use click or bind('click')? ...

Using jQuery or just plain Javascript is it possible to change to a custom cursor?

I know it is possible to use jQuery to do something like: $('body').css('cursor','wait'); What I want to know is: is it possible to change the cursor to a custom loading animation, such as a simple 'spinner' gif? Many thanks in advance. ...

get root URL in javascript

is there a really easy way to turn document.location.href=="http://aaa.bbb.ccc.ddd.com/asdf/sadf/asdf/asdf/asdf/sadf.aspx?blah" into 'aaa.bbb.ccc.ddd.com'? There's gotta be a JS function that does this reliably, but I can't find it. ...

Using anchor after adding using jquery html

Hi, This is two questions in one really... First, I have a list of 'tickets'. Each ticket has a unique ID, which I am using to ID the element. There is an option to click ('a.showMore') to view more information about the 'ticket'. When this is clicked, I'm using jquery.append to add an option to close this extra information and slide d...