jquery

jQuery problem with change event and IE8

There is a bug in jQuery 1.4.2 that makes change event on select-element getting fired twice when using both DOM-event and a jQuery event, and this only on IE7/8. Here is the test code: <html> <head> <script src="http://code.jquery.com/jquery-1.4.2.js" type="text/javascript"></script> <script type="text/javascript"> jQ...

Coda Slider error-slider not working in IE

hello, I have a coda slider on my Wordpress site. It works great in FF but I am getting the IE errors below. The slider appears but you can't click and navigate it to change images. This is a relatively new occurrence. No major changes. I disabled WP-Supercache plugin to see if that was contributing. Any advice on clearing this error is ...

jQuery .animate() not animating backgroundPosition in IE

I'm trying to animate a background image to move down a set amount of pixels but remain in the center of the page. Upon another click of an element I need it to move back to the top, but still remain in the center. Below is the current code: $(document).ready(function() { $('#email_campaigns').click(function(){ ...

jQuery event.layerX/Y is not relative to the element that triggered the event, is that correct?

If I use for example a mousemove event handler on a div and check the layerX property of the event, it changes when my mouse enters a positioned element inside that div (like an image). According to the jQuery Event object documentation it should follow the W3C DOM Level 3 specifications. But there's no mention of the layerX/Y property...

jQuery Cycle plugin

Hello, do you have any ideas why jQuery cycle plugin breaks backgorund image centering when sliding images? (without the plugin activated it works okay) Here is a demo of my page (try to resize the window or zoom out and see what I mean - the background image gets cropped) http://j.mp/czX3DD ...

jquery calling a function

Hi, yet again thanks for looking. i like to call a function (eg. comment_disp, post_disp or any other i create later on). i have created a json function with url, fname and id can i use fname as a function name? // on document ready runs json('comments.php','comment_disp'); url = url to get fname = function name id = post o...

Using different versions of jQuery on the same page

Users of my service includes a JS in their pages that I provide. I am hosting the script they are including. My script does some manipulation on their content. I am sick of writing my own DOM manipulators/selectors and wasting hours for jobs that can be done with 1 line of code if I can use jQuery. Some of the users of my service alread...

Missing http header in Ajax response

Hi SO I'm having an issue with some missing http headers in a Ajax response. The ajax-page (.NET) adds som additional info to the http header by using Me.Response.AddHeader("ResponseCode", mResponseCode). If I access the ajax-page directly and use httpAnalyser to check the headers, I can see that the headers are added correctly. But whe...

Help with jquery animate()

I'm using this code to change opacity when user is on and off a picture unfortunately when the user clicks the image the opacity does not stay at 1. Anyone has an answer ? $(document).ready(function(){ $('img#slide').animate({"opacity" : .7}) $('img#slide').hover(function(){ $(this).stop().animate({"opacity" : 1}) }, funct...

Why does this attempt at preloading images with jQuery not work?

Current I have this code: var imgCount = 36; var container = $('#3D-spin'); var loaded = 0; function onLoad() { alert(loaded); loaded++; if(loaded >= imgCount) { alert('yay'); } } for(var i = imgCount-1; i >= 0; i--) { container.prepend( $('<img>') .one('load', onLoad) .a...

How do I make a word bold in javascript?

I am using javascript to populate data in a table which return everything fine. I would like to make a string bold. See code below $tr.find('.data').val($('#txtName').val() + ' <strong>Address:<\/strong> ' + $('#txtAddress').val()); How do I make only the word "Address" bold? ...

How to simulate a close() in facebox

Hi, I am using facebox popup in one of my pages. I am having a button in the popup dialog. When I click that button the facebox popup should close (the same way it closes when we press outside the popup). How to do that? Also, I am doing some Ajax stuff when that button is being pressed so I cannot override the onClick event. ...

JQuery to PHP function and back Ajaxed

Hi all, i have a set of php function that i want to call on different events mostly onclick with jquery async (ajax). The first function is called on load $(document).ready(function() { $("#div2").hide('slow'); $("#div1").empty().html('<img src="ajax-loader.gif" />'); $.ajax( ...

JQuery behaves strange with different IE8 security settings

Good day! I'm not sure if I hit the bug, so please confirm that I'm not mad. I use IE 8.0.7600.16385 on 3 different machines. Here is simple page (I tested with both JQuery 1.4.2 and 1.3.2). It just displays alert if hidden link is visible. It displays 'false' in all browsers I have and in my IE8 when security zone is set to 'Trusted ...

Another IE Issue with AJAX

Alright, This code works in every browser except IE (again, to be expected). The code is supposed to refresh based on setInterval, and does so normally in all other browsers except IE, which just doesn't refresh. Can you spot the problem? var nick = document.getElementById("chatnick").value; var sessid = document.getElementById("sessid"...

Can you only return a string using jQuery Ajax?

I have been thinking about this. I am aware you can use json_encode(); to send an encoded array or multi-dimensional array via the jquery ajax call which will interpret the json array for you. However I am not aware of any other techniques to send more than just a string using echo, print or return from PHP to the jQuery script? Can so...

How can I alter an external variable from inside my AJAX?

I keep on having these same two problems. I have been trying to use Remy Sharp's wonderful tagSuggest plugin, and it works great. Until I try to use an AJAX call to get tags from my database. My setGlobalTags() works great, with my defined myTagList at the top of the function. What I want to do is set myTagList equal to the result from ...

formatting sourcecode using jQuery

Does anyone know if there's a jQuery plugin to format code, XML or HTML? I'm showing the user some code on an html page. I use google prettify for coloring the syntax, but would like some indentation and linebreaks too. any suggestions? ...

Domain redirect problem with JQuery/JavaScript

I got a strange problem. I have a fullscreen image scaler javascript (as GOTOCHINA website) that works very well on my website. Then, I purchased a domain redirect pointing on my website and when redirecting suddenly internet explorer 7 and internet explorer 8 give me this error Messagge: is not a valid argument. Line: 34 Char:...

Use jquery cookies in showing/hiding elements (jQuery)

Hello, How to use jquery cookies in showing/hiding elements in a page ? I got the plugin from here Tried some method but i am not successful. I used slideUp() and slideDown() functions to show/hide elements. When a element is slided up a cookie should be set. when the page is refreshed, the element should be in slided up position How...