[jQuery] How to gzip a javascript file | I am not able to find.
<div dir="ltr">Hi All, I am a PHP programmer. I dont have access to the htdocs or apache of my web hosting. <b>Can we gzip JS and CSS fiels? How to do it ? Can we do it PHP?</b> I am using windows OS. What i can see in the blogs are they are telling some unix commands to gzip. Is there any other way to do it on Windows Os? Is there any link which says => do these steps to gzip your js files. ------------------------------------------------------------------------------------------------------ Thanks
[jQuery] jQuery can't work if sending http header with text/xml
I use perl as server-side language to generate pages dynamically. The problem is: if I use ==> $q->header(-type=>'text/html', - charset=>'utf-8'); <== jQuery works fluently. But if I use ==> $q->header(-type=>'text/xml', -charset=>'utf-8'); <== jQuery fail to do the job. I use MathML in my pages, so I have to send http header with text/xml. Can anyone solve the problem? Thanks a lot. partial html file content generated by perl: ################ html ################# <body> <a href="#">Hello World</a>
fadeIn, fadeOut working in IE, but not in Firefox
Hi, I have the following html: <div class="toolItem"> <div class="toolHeading"> <p class="toolName">Care Management Definition</p> <span class="toolType">Tool Type: Internal Link </span> <span class="SpecSpacer"> | </span><span class="toolDownload"><a href="#">Download</a> </span><span class="SpecSpacer"> | </span><span class="moreinfo">show description</span> </div> <div class="ToolDescription"> <p>A comprehensive definition
[jQuery] Mouse-responsive scrolling content within a container, with mouse position and easing
Hi! I'm trying to emulate a Flash behavior I see quite often, like so: http://mgb-architecture.ca/ I've implemented a one-to-one scrolling version here, but I would like it to be smoother, easing in to its final position based on the mouse position: http://www.jillanholt.ca/projects The current jquery code is like so: $('#projects-container').mousemove(function(e) { newX = ($('#projects-container').width() - $('ul.projects- list').width()) * e.pageX/$('#projects-container').width(); $('ul.projects-list').css({left:
[jQuery] Nested GetJson Requests
Is there a plugin or some documentation as to how I can make say 10 async GetJson requests in a neat and managed way? By that I mean I fire off 10 async requests and as soon as I get the data back I want to display it on the page (order is not important, whatever finishes first gets displayed first). Also, I want to make sure I don't kill the browser due limitations as to how many connections I can have open at once. I recently saw a the functionality implemented on a site called usniff.com but they
[jQuery] using jquery to get at the img data???
I am trying to pull the image displayed in the DOM into an applet that will do some image processing (e.g. blur), show the updated image back in the DOM, and then print. Is there a way in jquery to do this? I found in JSobject, I can get attributes of the image, but I couldn't see how to actually get the image into the applet. On the return route, I couldn't figure out how to get the applet to update the DOM with the new image. Any ideas?
[jQuery] validate plugin and radio button
hi another little issue in my long form:) i got 5 couples of radio button: <input name="name1" type="radio" value="si" class="className" /> <input name="name1" type="radio" value="no" class="className" /> <input name="name2" type="radio" value="si" class="className" /> <input name="name2" type="radio" value="no" class="className" /> <input name="name3" type="radio" value="si" class="className" /> <input name="name3" type="radio" value="no" class="className" /> <input name="name4" type="radio" value="si"
[jQuery] JQuery Selector and Java Script Variable
Hiya, I've not been able to find an answer to this online! can someone point out the correct syntax for this: var myRel = $(this).attr("rel"); var largePath = $('a[rel*=' + myRel +']').attr("href"); Basicly the myRel gets set correctly, but how do i use the javascript variable as part of the jquery selector so that i can get a selector that looks like: (assuming myRel was 5)... var largePath = $('a[rel*=5]').attr("href"); Thanks in advance! Shadi
[jQuery] Printing this page button
Hi all, I have a print.css stylesheet attached to a page on my site. When I click on my print icon I want to go to the Print Properties window. I need this to work in all browsers. Is there a way to do this with jQuery? Is there a plugin? etc. pls help gemmes
[jQuery] Activate checkbox from URL
<div dir="ltr">Hi all,<div> </div><div>I'm using the Flot graphing plugin and I'd like to be able to have a specific series highlighted depending on the URL, as I want to link to it.</div><div> </div><div>This will mean activating a checkbox depending on the URL, for example:</div> <div> </div><div> /results/#science</div><div> </div><div>Would activate the checkbox with ID of 'science' or something similar, so when the user clicks a link with that #science parameter, the default checkbox to be
[jQuery] Edit table
Hello. I was wondering if you guys knew how to edit a table cell with JQuery and update it? I'm currently using JAVA/Spring for my webapp but I can't seem to figure out how to update a table cell within my jsp-page in the database. I have tried the plugin UITableEdit and tableEditor but the later didn't work with the latest version of JQuery. Any tip would help! Best regards // Olle Asplund
[jQuery] Calling seperate function in each()
Hi! I am making a simple expanding list with categories and content. This is my script: this.OpenElement = function () { $(this).unbind('click', OpenElement); $(this).bind('click', CloseElement); $(this).parent("li").css({backgroundColor: "#00ff00"}).children("ul").show(); return false; }; this.CloseElement = function () { $(this).unbind('click', CloseElement); $(this).bind('click', OpenElement); $(this).parent("li").css({backgroundColor: "#ff0000"}).children("ul").hide();
[jQuery] Simple AJAX Question
I have searched the web over and over and I can't figure out how to do this. I know jQuery very, very well, but I just haven't used AJAX before. All I want to do is simply When someone clicks a <li> I want to get its text() Use that text as var name = $(this).text(); Use name as the row (var name will be equal to the name in the DB) I want to call from the SQL db. I want the DB to send the info to a php page and then I want it to update TinyMCE(WYSIWYG). My main problem is I cant figure out how to
[jQuery] multi column Sort with pagination and filtering
Hi all, I am faily new to jquery and love it. I am in need of the ability to sort across multiple columns, filtering and pagination. I have tried the DATATABLES plugin which has everything I need except the multi-column sort. I have tried to modify the sort function to make it multi-column and have had no luck. so does anyone know of a plugin that has all of the above features or would be interested in assisting me in modifying the datatables script? thanks in advance J.
[jQuery] Can't get it work...-_-
I use perl as server-side language to generate webpages dynamically. The generated html page is as following: ############### html ################ <body> <a href="#">Hello World</a> <div id="box">How are you</div> </body> ############### html ################ the jquery file: ############### jquery ################ $(document).ready(function(){ $("a").click(function(){ $('<p id="name">peter').appendTo('#box'); if($('#name').length){ $('#name').show("slow");
[jQuery] some doubt
1. init $.fn[ready?"ready":"load"] (fn) here if we delete $.fn.ready,it comes $.fn.load(fn) equals to $ (document).bind("load",fn); Does it make any means? 2. selector if my selector is "~.xx" or "~ xxx",the search results are the same the reason is : the line 1537: // And remove the token t = jQuery.trim( t.replace( re, "" ) ); here remove the blank results a bug . i think here we should remove the code above or replace the code with "if ( t.indexOf(" ") == 0 ) continue;"
[jQuery] JQuery not working for dynamic content
i am loading xml data via ajax and using it to append rows in an html table. each table row (TR) has a class and an event is supposed to fire whenever the row is clicked. but it seems my jquery events are not aware of the new content. how do i sort this one out?
[jQuery] Charset with data loaded through ajax
Hi! I have started using ajax to load data on a homepage for a faster easier usage. The homepage is created using ISO-8859-1 as charset and that seems to cause a few problems using ajax. Everything works fine until I get data with åäö in the content, then ajax insted sends strange signs. It seems that all the data I load through ajax is sent using utf-8 instead of iso-8859-1 witch all my files is. Is this a known problem and does anyone have a solution?
[jQuery] Redirect browser to separate page after animation
Is it possible to redirect the browser to a separate page after a jQuery function? For example: $(".blah").click(function () { $(".block").fadeIn("slow"); }); As soon as the fade in animation is complete load the webpage "foo.html"
[jQuery] set dom id
I need to dynamically set the DOM 'id' attritube for elements using jQuery notation. Is that possible, if so, can I get an example please? $('element-id')[id] = newid doesn't quite work. :-) Thanks!
[jQuery] ScrollBar issue with Tab key in input controls
In this http://tradeera.com/contact.html When the user tabs through all the controls the ScrollBar does not goes down instead the whole div goes down and so the whole scrollbar gets invisible till the time we get to the last i.e. When we click the first textbox and then click Tab then the scrollbar does not automatically goes down instead the scrollbar becomes part of the div tag and goes up Just press tab and see the scroll bar and you will understand the problem. How to resolve this? Thanks in
[jQuery] default date does not seem to work in DatePicker
Hi, I keep finding issues with this control :( Here's how I created the range : $("#fStartDate, #fEndDate").datepicker({ showOn: "button", buttonImage: "images/calendar.gif", buttonImageOnly: true, defaultDate: "null", beforeShow: customRange, hideIfNoPrevNext: true, showStatus: true, duration: "", dateFormat: "dd MM yy" }); Note the defaultDate parameter, yet my input are empty instead of being default to today's date.... I had to manually set the dates after the datepickers are created : $("#fStartDate").datepicker("setDate",
[jQuery] Datepicker issues with setDate
Hi, #StartDate and #EndDate are my two input fields that I've converted to datePickers. Now if I call setDate to change the range to the past week like that : $("#fStartDate, #fEndDate").datepicker("setDate", "-1w", "null"); Both input are set to 13th of October (today is 20th). I'd expect #EndDate to be set to today's date since I've left it as null. If I set both of them separately : $("#fStartDate").datepicker("setDate", "-1w"); $("#fEndDate").datepicker("setDate", "null"); Then it works. Is there
[jQuery] draggable plugin problem
Hi, well i used and still use the draggable plugin in a script. it worked fine 'till they changed the site a bit. after i changed my script firebug says: $[namespace][name] is not a constructor [Break on this error] return this.each(function(){var instance...==undefined){return this._getData(key);} and it somehow clones all the time the image and buttons in every browser. i don't know whats wrong. the script works fine without the draggable. that is the only drag thing: $(this).draggable( { handle:'#move'
[jQuery] Resetting the html in a div affects the behaviour of event handling?
Hi all, I am a newbie (thank you in advance for yr patience) and stumbled upon an unclear behaviour (to me). I have the following sequence: 1) create an HTML object 'whatever' containing also the following 'test' link <a href="#" class="foo">test</a> 2) set it to be showed in the available div 'myDiv' $("#myDiv").html(whatever); 3) listen to the click on the 'test' link to trigger an action $('.foo').click(function(event) { event.preventDefault(); alert ($(this).attr('class')); }); No problems until
[jQuery] how can i get the direction of an html element?
hello friends, in my case, the direction is not being set through the dir attribute, but it's inherited from the parents of the widget. how can i get this attribute in jquery? best regards, alex
[jQuery] making autocomplete right to left
hello friends, i am using autocomplete in a possibly right to left environment, hence i needed 2 changes: 1. putting the loading gif to the left (done in attached code); 2. putting the scrolling bar to the left. here i'd appreciate your help with a solution. thanks in advance, alex
Multiple slideToggle
http://test.sebastiencouture.com/jf/ Here's a WP template I'm working on. When you click any of the 3 menu items in the header, a div slides down. What I'm trying to achieve is that when a 'drawer' is open and you click then same item it simply closes but if you click an other one it will fade to it. Thanks Seb
Applying css to jquery-loaded HMTL-markup
I'm having issues with doing this, although it seems to very doable using the jquery css function (example below): $('#checkbox').css({ textAlign: "left" }); Specifically, when a user clicks submit, I'm loading an XML document, parsing it and applying HTML mark-up with class styles, and trying to apply the style using the above functionality. Why isn't it working ? Specifically, the ul/li mark-up isn't responding to the css styles. I greatly appreciate any support/reponse I can get on this. I can
[jQuery] Multiple JQuery Bottleneck
Hi guys, This is my 1st time asking the questions hence please bear with me if I did it wrongly or etc. I have a J2EE application that used jQuery quite a lot. There is one page that called jQuery 4 times upon loading. Out of these 4 calls, there is one jQuery call that took around 20-30 seconds depending on the criteria that user chose. However, unfortunately, I found that the other 3 jQuery calls are in fact waiting for that 1 jQuery call that took some time to complete before the rest can also
[jQuery] Looking for a way to pause (w/o using setTimeout) in an animate() function which is in the second...
...part of a hover() function. Whew. SO, I'll post the code tomorrow (I'm not at work right now). Basically, I am animating a little tab rising and falling upon mouse rollover. I'm comfortable with hover() and its dual function firing (mouseon and mouseoff {miyagi-like there...]) and I wouldn't have this question exept for one catch. The image inside the tab changes uopn mouseover and mouseoff as well. Basically, inside of a hover() 4 things are happening: 1. mouseover occurs: background image of
[jQuery] Showing 1 post after being buried.
Hello. jquery newbie here. I'm trying to build a digg-like bury- comment feature with drupal. I got the comments to bury after a certain number of negative votes, but i don't know how to create a *show button that shows only 1 post (after it's been already buried). Anything like this: $("p").click(function () { Would affect all hidden posts right? How would I go about it so that jquery selectively targets 1 post like digg does. Thanks!
[jQuery] Jquery change event
How do I get jquery's change event you fire per letter typed into a text box? I'm using the code below, but it only fires when I tab off the textbox. Thanks, Ronn <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/ javascript"> $(document).ready(function() { $('input').change(function() { alert('you changed something'); }); }); </script> </ head> <body> <input type="text" /
ajax help - cant translate javascript ajax to jquery.
HI guys.... first post. I have this jscript function: function ajax_write(url){ if(window.XMLHttpRequest){ xmlhttp2=new XMLHttpRequest(); if(xmlhttp2.overrideMimeType){ xmlhttp2.overrideMimeType('text/xml'); } } else if(window.ActiveXObject){ try{ xmlhttp2=new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try{ xmlhttp2=new ActiveXObject("Microsoft.XMLHTTP"); } catch(e){ } } } if(!xmlhttp2) { alert('Giving up Cannot create an XMLHTTP instance'); return false; } xmlhttp2.open('GET',url,true); alert(url);
[jQuery] Best practices for including Jquery
I have been wondering where others feel its best to include jquery and other .js files in the html. Include it in the HEAD or at the end of the html document just before you close the BODY tag? There are arguments for including it at the end of the document so that the dom is fully loaded by the time the javascript loads, but that argument falls away with jquery's ready event. So is it truly beneficial at the end? So far i have been including all my .js files in the HEAD with no problems, as well
[jQuery] Jquery tab
Hello, I am looking for a jQuery ajax script that can do the following: http://www.doublemedia.nl/nieuws.jpg When someone goes with his mouse over one of the tab's you see in the image he has to load the content that belongs to the chosen tab. Any one hoe knows a jquery plugin that can do this? Erwin
[jQuery] Problem with DIV CONTENT & show()
Hello everybody! First, I am sorry for my poor english! I am from Argentina. Well, I have the next problem in IE7, it works fine in FF. I have DIVs, they appear when some IMGs have a mouseover or when a A (link) has a click. I use show() to make them appear (or dissapear, because they are 1in the same place). Some DIVs content have links and one of them ("contacto"), has a form. When they appear, I can't use the content. I mean, it appears all like a big text and the mouse doesn't recognize the link
[jQuery] Jquery hide and fadeout are not the same
I have these two lines of code: $("#imagestrip ul li a img").hide(); $("#imagestrip ul li a img").fadeOut(1); While Hide not only hides the img element it also hides the li element. fadeOut only hides the img element. Is this a bug or a feature? I want to be able to hide only the img element but I want the hiding to be instant, not a fade. -- View this message in context: http://www.nabble.com/Jquery-hide-and-fadeout-are-not-the-same-tp20043754s27240p20043754.html Sent from the jQuery General Discussion
[jQuery] Slide one div off left, expand another in one click?
I have a page to code where there will be two divs side by side. The left one will contain navigation, and a << button. Clicking this should slide the dive off the page to the left, leaving just a >> button. At the same time, the right-hand div should expand to fill the space left. Clicking the >> button should reverse the process. Google Maps is a good example of what I'm looking for. Q1: Is this something I can do with jQuery? Q2: If so, can anyone point me in the right direction or even offer
[jQuery] use .each? hover over list items to change contents of div
So, I have a ul list like so: <ul id="fruits"> <li id="apple">apple</li> <li id="orange">orange</li> <li id="grape">grape</li> </ul> I also have a div that is currently displaying an image of an apple using a background image: <div id="fruit-display"></div> where #fruit-display {background: url(images/image_apple.jpg)} I want to be able to change the image as I hover over the different items on the list. I have something like this: $('#fruits li').mouseover(function() { id = $(this).attr('id'); menuId
Next Page