jquery

Print Css not loading

Hi I am trying to load my print.css but it does not seem to be loading. it work Fine in FF and Safari but the problem is only in IE. I have the regular external css for the page inbetween the head tags And when the user click on the print link . it loads the print css . <div class="linkPrint"> <a target="_blank" href="?format=prin...

PRoblem with shadowbox and ie

Hy I am trying to open a external page in a shadowbox holder the script is nt that complex. In mozilla it work`s grate but IE all versions it does not load the page or it does not display it because all that I see is a lack screen Can anyone help me pls <script type="text/javascript" src="js/moving-boxes.js"></script> <script type='text...

Using jquery on button in an enumerated list

I have a view that will create a table while enumerating over each item in my model. to each row I need to add a button. I need would like to have a jquery function tied to each button to show an alert when it is clicked. the text will be different depending on the row item that is clicked, so I must know what row the edit button is in t...

attribute value

I have an atribute test that I get the value of like this $('#row').attr("test"); now I need to put this in a loop and get the value but its not working. This is what I am doing for(var i=0; i=mySpansCount; i++) { var x=($('#row').attr("test")); alert(x[i]); } All I am getting in alert box is undefined. Thanks ...

How can I get the index of an ancestor within another ancestor?

I've got a list that's got a mouseover event bound: myObject = function() { this.listTemplate = $("<ul></ul>") .mouseover(function(event) { //Do mouse over stuff }) .click(function(event) { //Do click stuff }); //...more stuff } later on in my code, I'm populating this list...

jquery attribute value in a loop

Possible Duplicate: attribute value I have an atribute test that I get the value of like this $('#row').attr("test"); //this works now I need to put this in a loop and get the value but its not working. This is what I am doing for(var i=0; i=mySpansCount; i++) { alert($('#row').attr("test")[i); } All I am getting in al...

Set radio button 'checked' in jquery based on ID

I have two radio buttons with the same name, one is checked by default. How can you check or uncheck a radio button in jQuery when selecting from id? I've tried: $('#radio1').attr('checked','checked'); $('#radio1').attr('checked', true); Nothing seems to work.. any ideas? Thank you! ...

Reusable JS ajax pattern (jquery)

I'd like to know if there is a better approach to creating re-usable ajax object for jquery. This is my un-tested code. var sender = { function ajax(url, type, dataType, callback) { $.ajax({ url: url, type: type, dataType: dataType, beforeSend: function() { o...

Radio button onclick insert value to href

Hi, I’m trying to insert the url from an onlick event in the the radio buttonsto the href link but it not working. Here’s I have so far. <input type="radio" name="orderID" value="1" onclick="javascript:document.getElementById('editBTN').href='forms/editForm.cfm?orderID ='&this.value"> <input type="radio" name=" orderID " value="2" o...

jquery autoResize breaks form validation for textareas

Here's a snippet of the jquery: $(document).ready(function() { $('textarea').autoResize(); $('#submitSurvey').click(function() { -- Skipping several lines -- $("input[id$='Buggy']:radio:checked").each(function() {// If any radio buttons are marked "Buggy" and no comment is left, require comment var parent = $(this).parent().g...

Enumerating through a JS array in jQuery

OK jQuery experts : So .. I'm coming from a Prototype background. I do the following code all the time (or some similar variation): MyObject.prototype.someFunction = function() { var myArray = ["a","b","c"]; myArray.each(function(arrayEntry) { this.printPart(arrayEntry); }, this); } MyObject.prototype.printPart = fun...

How do I refer to an appended item in jQuery?

I want to create and append an item in jquery, while saving a reference to it. var buy = "<img src='img/buy-now.png' />"; var $buy = $(buy).appendTo("body"); $buy.html("hello"); I was expecting something like the above to work. Any ideas? ...

How can i stop this countdown on mouseleave?

Here is the code: //Mouseover start countdown $("#icon_no_1").mouseover(function() { $(this).fadeTo("slow", 0.23); //Countdown var counter = 0; var interval = setInterval(function() { counter++; // Display 'counter' wherever you want to display it. if (counter == 1) { //Display 1 $('#login_icon_1').fadeIn(); ...

jquery animate, but not specific li class

Hi all, I'm using jquery to change/animate bg positions of a menu item, but I need it to not do anything if the li class is "active", but I can't seem to figure out how to use the not selector (or even if it's appropriate for this case?). Here's the code: <div id="menuHolder"> <ul> <li class="active"><a href="/">menu 1</a></li> ...

Accessing javascript object reference.

Ok, Im wondering if it is possible to transfer the reference of the object to the functions. If you dont understand what im trying to say, this might help: //so i declare the variable `Editor` var Editor = new (function(e, d){ this.edit = e; this.dyna = d; this.old = ""; //and set these variables inside the object this....

Cuffon is undefined. Javascript error on IE7 and IE8

I am getting this error 'Cufon' is undefined on my blog http://microreviews.org The error comes on Line 20, char1. I also get the error 'dtsv' is undefined on Line 57 and character 3. The errors comes only on IE7 and IE6 and no other browser. I donot really care for IE6 but the error on IE 7 is a major source of concern. What can be d...

In jQuery, fontSize and font-size are both valid in the css() function, but in animate(), it has to be fontSize?

In jQuery, fontSize and font-size are both valid in the css() function, but in animate(), it has to be fontSize? Are there more rules for other functions? so the safest is still the form fontSize Update: our project uses jQuery 1.3.1, and it will not work... but I just checked that 1.4.2 will work with "font-size" even for animate. ...

What's the easiset way to create a custom jquery ui button for dialog?

in 1.8.2 I don't want to use the customer themed button. I need to create a few custom buttons. Actually very similar to the stackoverflow - Ask Question button. What's the best way to go about doing this and making it reusable. I'm basically using jquery ui out of the box, but I need to add a newly styled button. Into the dialog func...

jQuery's $('#divOne').animate({zIndex: -1000}, 2000) does not work?

I tried jQuery's $('#divOne').animate({zIndex: -1000}, 2000) to that element which has a z-index of 1000, but it is still above the other elements? (If I use firebug to change it to -1000 then it will be below other elements) ...

jQuery mouseover link to show hidden div

Hi, I came across the mouseover event on extratorrent site like the following image. When you hover the mouse over the username link, it shows a hidden div. Pretty neat and slick. I'm new to jQuery.Can anyone show me how to get start on the right track to do that? Thanks. Update 1: I wrote something like the following attempting t...