jquery

How to remove variables from links on a page with jQuery

Hi everyone, Simply I have a bunch of links like so <div id="categoryLinks"> <a href="blah.php?something=this&category=21"></a> <a href="blah.php?something=that&category=21"></a> <a href="blah.php?something=then&category=21"></a> </div> What I'd like to be able to do however, is go through all those links and remove the e...

change char-set of page with jquery

can i change the char-set of the page in jquery ? i need it , because i support old system that not use utf-8. on user click i want to show different language form . It is text that come via ajax I CAN GET IT BUT COULD NOT CHANGE IT : var meta = $("meta").attr("content"); alert(meta); thanks ...

Show Html Elements above other Elements on MouseOver using Javascript

On this page in Espn.com, if you go to the upper right corner and hover over "myESPN", an inline popup window (if that is what it can be called) appears (in such a way that it looks connected to the initial button) and allows the user to log in to the site. In the html it looks like there is a hidden div that is made visible and is pus...

How to get the value of an attribute with jQuery

Hi all, suppose I have an html document that looks like : <html lang="en"> ... </html> my question is : how to get the value of the attribute lang with jQuery? I've tried $("html").attr("lang") but it did not work ... any suggestions ? thanks a lot ! ...

How to release browser session

I have a web chat application and we are using jQuery. When a user is idle or doesn't hit the browser in say, 15 minutes, then it should automatically destroy the session of that particular user and redirect him to the login page. How would I do this? ...

Dynamically loading a SWF into ShadowBox

FYI, ShadowBox is a javscript media viewer/lightbox. http://www.shadowbox-js.com/ Running into an issue when trying to dynamically load SWFs into my ShadowBox. My script outputs the following HTML: <div id="LightBoxItemList"> <a href="Images/large01.jpg" rel="shadowbox[Mixed];" class="First" /> <a href="Images/Hydro_Sample.swf" rel...

Use both jQuery.checkbox & jQuery.field

Hi, thank you for your time. I am trying to use 2 Jquery solutions on the one form, but I am unable to get the desired result after working on it for several hours. The first jquery solution enables a better look and feel http://www.envirotalk.com.au/jquery/jquery-checkbox.htm The second jquery solution enables a limit to be set on t...

jQuery Nested Sortable - Move LI elements within all available UL's

I have the following code which works although it runs quite slowly I feel. What I want to do is allow <li>'s to be moved freely under existing <ul>'s or move them up a level. I also want to be able to create heirarchies so if you dragged a <li> under another <li> that would create a heirarchy. I think in that sense I would have to rend...

jQuery addClass not working

Hi, I'm trying to use addClass to give me zebra-striped tables on my Joomla template. Im using the following code: <script> jQuery(function($) { $("tr:odd").addClass("odd"); }); </script> I've been able to use the tr:odd selector to add css to table rows dynamically, but when i use the addClass function it just doesnt (I chec...

AJAX/JQuery response time performance widget

I'm looking for an AJAXian widget that shows the time between client browser and server. Any ideas? ...

jQuery masonry plugin - Have trouble getting the divs to stack properly in IE7

Hi all! I have a problem with the Masonry plugin to jQuery. If you take a look at this link: http://iloveinternet.org/kunder/omk/ and scrolls down to the brown field with a pink line on top. Can you see the div boxes there? They are supposed to be stacked next to eachother in rows of three with the masonry plugin. This works fine in m...

Calling jQuery methods from Javascript functions

I have a method written in JavaScript let's say 'callme' and I have some jQuery code written within the block $(document.ready). My question is how to call the existing JavaScript method 'callme' from within the jQuery block. The assumed listing is as follows, function callme(){ // do some complex processing. I don't want to do th...

jQuery - run code upon iframe navigation?

I have an iframe on my page. I want to assign a function to run when the SRC of that iframe changes (ie, someone clicks on a link inside the iframe). Is this possible? I've tried: $("#my-iframe").change(function() { ... }); but nothing fires. ...

In Jquery how do you find out the 'eq' of an element of what is being clicked?

When one of the divs inside 'uploadChoice' is clicked, how can I ascertain which one is clicked? Can I return an 'eq' value somehow? <div id=uploadChoice> <div>Text</div> <div>Image</div< <div>Text & Image</div> </div> $("#uploadChoice div").click(function(){ //insert code here! :) }); ...

JQuery Click versus Change

Hi all, I recently asked a question and posted some code, to which a suggestion was to change my click handlers on a select box to change. My question now is this: should I always use the Change handler -- or are there situations where Click would still be appropriate (Assume I would like cross-browser compatibility). EDIT: Here...

jQuery $.get() function succeeds with 200 but returns no content in firefox

I'm writing my first bit of jQuery and I'm having a problem with jQuery.get(). I'm calling this; $.get(url, updateList); where updateList is defined like so; function updateList(data) { if (data) { $('#contentlist').html(data); } else { $('#contentlist').html('<li><a href="#" id="synclink">Nothi...

JQuery style display value

How can I check the display value of an element <tr id="pDetails" style="display:none"> $("tr[id='pDetails']").attr("style") gives me 'display:none' I want to write a jquery script that will return me only the value of display which is 'none' Is that possible? ...

Dealing with long server-side operations using ajax?

Hi there, I've a particularly long operation that is going to get run when a user presses a button on an interface and I'm wondering what would be the best way to indicate this back to the client. The operation is populating a fact table for a number of years worth of data which will take roughly 20 minutes so I'm not intending the int...

jQuery selecting and filtering elements inside a div

Hi again all jQuery coder I have a problem with selecting and filtering elements inside a div. My html looks like this <div id="wrapper"> <input type="text" value="you can edit me"> <input type="button" value="click me"> </div> and my jQuery looks like this $("#wrapper").children().click(function() { alert("hi there"); ...

How do I use raw javascript in jquery and add unique functions to jquery selectors?

I am looking to do what the title says. As I am new to client side programming with java script all to together I do not know the "right" and "proper" way of achieveing what I need done. I wish to use a simple javascript function var x; var items = {}; for (x = 0, x < 7; x++) { items[x] = new num; } $("li").addclass("items" + n...