[jQuery] Beginner - how to travers up one node and down again
I'm trying to do a simple show/hide. When a user clicks an a link, I want to hide the dd for that link. Any ideas why the .children() is not working? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Tabs 1</title> <style type="text/css"> .hide {display: none;} </style> <script type="text/javascript" src="jquery-1.3.2.min.js"></script> <script type="text/javascript"> $(document).ready(function(){
[jQuery] How to display image from urls
Hi all,<div> </div><div>In my application, i get a set of urls. the url basically contains an image. How do i dynamically extract the image from that url and display on my page.</div><div> </div><div>Thanks</div><div> Arun</div>
[jQuery] Nested :eq selector issue?
Shouldn't :first be the same as :eq(0)? I set up a basic test page with one div in the body. I ran the following statements to get the HTML element and the first works, but the second actually throws an error. alert($("*:has(BODY > *:first)").eq(0)[0].tagName); alert($("*:has(BODY > *:eq(0))").eq(0)[0].tagName); Other filters work such as alert($("*:has(BODY:has(*))").eq(0) [0].tagName); Any thoughts? This goes along with my post about trying to create a selector which returns the parent, but the
[jQuery] adding class whenwindow is resized below 1000px
Hi everyone, I'm trying to figure out a way to add a class only if the browser is resized by the user at less then 1000px This is what i have going right now. $(function(){ $(window).width('width','100%'); $('body').css('width','w < 1000px'); $("body").addClass("no_border"); }); as of now the class of no_border is added to the bofy at any width, like I mentionned above i only need thsi class to be applied if the user or if the window is at less then 1000px Thanks for taking the time
[jQuery] Problem with fade-effects and IE8
Hi, I've a problem with the fadeIn() and fadeOut()-commands of jQuery using Internet Explorer 8. Firefox, Opera, Safari and IE up to version 7 works fine. I'm not getting an error or something from the console, the effect is simply not executed. The elemtent is staying fixed and doesn't hide and vice verca. Any Idea if this is caused in jQuery? Anybody else who has this problems? Thanks and greetings, Boolace
[jQuery] $.post(), php file in parent directory?
Is it possible to use $.post() with the php file in parent directory or a completely different directory?
trigger Onload - how to?
Hello everybody, I am pretty new to jQuery and I could need some help on a rather complex problem. My goal is to populate selectboxes in a chain with the help of php, mysql and jQuery. E.g: Germany, Bayern, München I found some great code which I have adapted to make it suite my neads. It basically works, but I have the following problem. Right now the code only works if one selects for example the province. Then the script returns the cities. I would also need to make the script pull the cities
trying to hide element on hover
Could someone quickly take a look at this code and tell me if I messed up something in the syntax? I'm simply trying to hide a div when a menu item is hovered over to get around a z-index problem in ie6. My text editor (MS Visual Web Developer) is telling me that there is a problem with the final two sets of brackets/parentheses (in addition to my not being able to get it to work). When I hover over the squiggly underline that indicates that there's a problem, it says that it "expects a comma or
[jQuery] how to remove elements by attribute
Hi, How can I remove all <div foo="whatver"...> div elements using the attribute foo for my selector? Basically any div with a foo attribute I want gone. Thanks, Jason
[jQuery] Structuring advice: cloning a set of dynamic dropdown menus
Hi there, I have a table that looks like this: The user can click the 'Add another category' link and another row is inserted. My issue is here: those two select boxes are linked, meaning that depending on what is chosen from the first one, the options are changed in the second one. When I clone this row, the new cloned row doesn't work properly - the first select box ('Publication') changes ALL of the 'Categories' choices in the second column. My HTML is structured so that the table row contains
[jQuery] submit of only the result from a quicksearch
I would like only to submit the result of a Jquery quicksearch which i have put on a html table. If i do a normal submit , I get every row submitted , also those where jquery puts "display ; none" An even better is it also possible to use ajax to submit when a row is changed . my <TR> 's has about 5 <TD> pr <TR> and max 500 <TR>' s thanks in advance
[jQuery] auto-complete
anyone have any examples of auto-complete ?? tenks
[jQuery] Delfate (and zlib) encoding is better than gzip.
jQuery.com's homepage encourages using a gzipped version of jQuery. Why not advertise HTTP 1.1 deflate encoding instead? It is better. (even better than HTTP 1.1 deflate is sending raw deflate [without the zlib wrapper]). I've done some research on this and posted the results here: http://stackoverflow.com/questions/1574168/gzip-vs-deflate-zlib-revisited Are there any reasons to _not_ encourage deflate over gzip?
[jQuery] How to access a JavaScript object from within an ajax call?
I am trying to access my own JS object from within an ajax call, and can't figure out how to get it to work. Whenever I access "this" in the function, it returns the ajax context and not my JS object context. My code looks something like this. I have a Zone object defined in a JS file like this: //====================START CODE================ function Zone(data){ this.someInfo = data; this.load = Zone_Load; } function Zone_Load(){ $.ajax({ type: "GET", url: "http://localhost/foo.xml",
[jQuery] Announce => ChessTwit now using jQuery
Hey there, Just wanted to tell everyone about ChessTwit that's using jQuery to good effect. "The best place to play correspondence chess with your friends on Twitter. Log in and get playing!" Hope you like ! Cheers @weepy
[jQuery] Menu flickers open
Hello, I have a Jquery enabled menu, but when the page loads, it is open for a split second.(ONLY in IE) I dont know if it a js or css problem. http://ampsoft.com/Testindex.html Thanks Mike
[jQuery] How to check if a DIV with ID xyz exist?
Hi, how can i check if a DIV with the ID xyz exist? thank you yavuz
[jQuery] Ajax enabled Links/Forms and AutoRefresh
I'm looking for following ajax functionaliaties. Can you please point me to some example or correct page in documentation. 1- Ajax enabled Link (<a>) that on click fetch data from server (database) and refresh an area of page with new data 2- Ajax enabled form, that on submit does same as above in point#1 3- Automatically sends an ajax call to server after given number of seconds, gets data from server(database) and refresh a area on page. Just like pop-up alerts used by Outlook
[jQuery] Submenu's
Ok ive tried like everything, my content areas are overlaping with my submenus, and ive probly set every single functions z-index to 10 in the superfishmenu's css. Ive even set the content areas thats overlaping with my submenu to -z-index Any1 got another idee, im really clueless now, and i really want this to work :( its exactly what i need! Thanks
[jQuery] AJAX and JSON
I have some code working that invokes an HTTP service that returns JSON. From my JavaScript I call the service with: $.getJSON(url + "?callback?", function (json) { // do something with json here }); My service is implemented as a Java servlet with a doGet method. In that method I: 1) set the content type of the response to "application/x-javascript". 2) get the value of the callback parameter 3) create a Java Map 4) use the org.json library to convert the map to JSON text 5) build a string of JavaScript
[jQuery] Improvements jQuery.support
I found this website which has done a great job writing some detection functions for some of the new html5 capabilities. Perhaps this is something that could be added to jQuery.support? I don't know the policies for inclusions, perhaps it's something you rather see people include themselves. However, I thought I'd post a notice here in case it hasn't been discovered already: http://diveintohtml5.org/detect.html#input-types one example: function supports_input_placeholder() { var i = document.createElement('input');
[jQuery] Cloning a table row and changing its form field IDs
Hi everyone. I'm writing a dynamic form that allows users to add fields. These fields are contained in a table. I have this function to clone the rows (my table has an ID of EventType) function addEventType() { var clonedRow = $("#EventType tr:last").clone(); $("input", clonedRow).attr('value', ''); // reset the form values $("input:checked", clonedRow).attr('checked', ''); // uncheck any checked boxes $("#EventTypeID").append(clonedRow); $(".datepicker").datepicker(); // reset
CSS I set by JQuery changes to nothing after page loads
Hi, I am using JQuery to add a css class to a LI. when I click on LI, it initially changes to the style I want it but it quickly goes back to how it was because when page loads, the element loses the css class JQuery has just added. This is my JQuery: $(document).preload( $(function() { $('#tabs li a').click(function() { $('#tabs li a').removeClass('current'); $(this).addClass('current'); }) }) ); Any help will be very much appreciated, E
[jQuery] jQuery plugins seem not working after the back of the browser only with Safari and Google Chrome
Hi everyone, In my web page I have the following code: In the head part the loading of jQuery library and a jQuery plugin named jquery.queryNickName: <script type="text/javascript" src="http://lib.community.virgilio.it/ js/lib/std/jquery/jquery-1.3.2.min.js"></script> <script type='text/javascript' src='http://lib.community.virgilio.it/ js/lib/mtx/jquery/jquery.queryNickName/jquery.queryNickName-last- min.js'></script> <script type="text/javascript" src="/myvirgilio/js/index.js"></script> In index.js
[jQuery] How to do refresh only when new tweet is added.
Hello I have scripts which refreshes my file after few seconds. but i want it should refreshes only when that file is got new data(new tweets) index.php <script> $(document).ready(function() { $("#responsecontainer").load("index-tweet.php"); var refreshId = setInterval(function() { $("#responsecontainer").load('index-tweet.php?randval='+ Math.random()); }, 8000); }); </script> index-tweet.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
[jQuery] blockUI cursor bug when overlayCSS backgroundColor is empty/transparent
I know there's already a couple of posts about IE cursor issues, but this one is slightly different I think. If you set the overlayCSS backgroundColor property to an empty string or 'transparent', IE will not change the cursor when blocking the UI. E.g. $.blockUI({ message: null, overlayCSS: { backgroundColor: '' }, fadeIn: 0, fadeOut: 0 }); The above will not change the cursor in IE. I have worked round this by setting the overlay properties to white with zero opacity instead, which does produce
[jQuery] Accessing jCarousel outside of the callback...
Is there anyway that I can access the specific carousels of an element outside the callback function? i.e. jQuery("#id").jcarousel.scroll(3);
[jQuery] jQuery UI draggable
Suppose that I have this div <font face="courier new,monospace"><div id='draggable'> <div id='header'>xxxxx</div> <div id='content'>zzzzzzzzzzz</div> </div> </font> I use jQuery UI draggable to make the div 'draggable' draggable <font face="courier new,monospace">$('#draggable').draggable();</font> Then I can press the mouse anywhere in the 'draggable' div and drag that div. Now I want to drag the 'draggable' div only when I press the mouse on the 'header' div. How can I do that? Thank you.
[jQuery] Question regarding image grid
Hi all,<div> </div><div>I am trying to build an application that displays the images in the form of a grid. We get the total number of images and number of images displayed on a page through a cgi parameter. Can someone suggest me how to build such an image grid with pagination controls? </div> <div> </div><div>Thanks,</div><div>Arun</div><div> </div><div> </div>
[jQuery] how jquery handle the redirect quest from server(php)?
Hi everyone: I just started to learn jquery and met this problem: I would like to use .ajax to send a http request. For example: I got the code like the following $.ajax( { type:"GET", url:"./include/coor_generator.php", complete:function (xhr,statusText) { alert(xhr.status); } } ); However, in 'coor_generator.php', I would like to verify if that user session is already verified or not, so that the content of 'coor_generator.php' is like: <?php require_once("session.php"); require_once("DB.php");
[jQuery] alter the font size of a dynamic header?
Hello. We are working within a CMS and we have a dynamic text header that pulls into the top of the page. The problem is that there are certain titles that are too long and are breaking into other design elements. I'm thinking there should be a way to count the number of characters and then dynamically change the font-size of the header. 1. Is this possible? 2. Can you point me in the right direction? Thanks. derek ________________ gravity switch We Put Technology in its Place p: 413.586.9596 f:
Image collision
Hi, I need some plugin / class / method to detect the collsion between two images, but not just rectangle images but even between rotating images and not-only rectangle shaped images. .. is there any easy way how to find out if two images are colliding in jquery? thanks
[jQuery] Unexpected $(document).ready() behavior when jQuery is loaded after the page
I am experiencing unexpected behavior using $(document).ready() on a page where I inject jQuery after the page has loaded and then attach listeners to the ready event. The ready() event is never called using Firefox and Safari however it is called using IE. Is this a jQuery bug? Is it working as designed? Any suggested work arounds? The example at the bottom of the email illustrates the problem. The example is also available at: http://www.damagedsoftware.com/latejqueryready_test.html Thanks, Ryan
Is it possible?
Sorry Im kinda new to jQuery, Im currently using the tablesorte pluggin, Im makin a website with a table that has some customers information, the thing is that the header has actually 3 rows as the 2 first are filled with information, the third row its the "main head" so to speak... I want to use this 3rd row to sort the table.. I tried to tag the 3rd under thead but it wont work it always take the first row which its not functional as some of the have more columns that the 3rd one.. any hint or
A better way of jQuery in-page form submission
OK, so as a webmaster I like to make things easy for my users. One of the things I'm working on is to leverage jQuery to provide a feedback form for a specific part of a corporate intranet that doesn't require the user to refresh the page or navigate back to where they were. This seemed easy to achieve, using a modal window and jQuery methods of submitting a form sans-page refresh/redirect. All sounds good so far. Also being a good webmaster, I want to set this snippet of code up right the first
[jQuery] announcing a simple progressbar
I did a simple progress bar which can work on top of jQuery for a project. and just uploaded it so everyone can use it. Check it out http://open.whynotonline.com/progress-bar/ A demo and a little description is here http://open.whynotonline.com/progressbar/index.html
[jQuery] Can you remove styles from a certain UI
i have a jquery slider, and jquery tabs on one page.... i dont want the tabs to have the theme the slider does... is there a way to set the tabs to not use the theme style, on the same page as the slider?
[jQuery] How to address elements (id? name? class?)
Hi, I am wondering how one should mark elements to find them later, for example to attach event handlers to them. It is clear, that "id" certainly IS a way to do it, but having to use unique ids is quite uncomfortable, because it requires setting up some kind of "id namespace plan". As a common example, imagine there is a global search functionality in the header of every page. If I call it "#search" I get a problem when I later add a local search form on one of the pages. So how do you handle this?
Can swapImageClick work in a span?
I've tried tons of possibilities in the last 5hours on this. I have come here as last resort. Here is what I have and it works, but I want it another way. <div class="CollapsiblePanelTab" tabindex="0"> <img class="swapImageClick {src: 'images/tog_minus.gif'}" src="images/tog_plus.gif" alt="" width="16" height="16" id="Plus"> Random Text</div> This is part of a TAB in Spry's Collapsible Panel. Basically I'm trying to get the plus to change to a minus when the panel expands. And back to plus on collapse.
jQuery slideUp/slideDown messing up list items
Hi all. It seems that using the slideUp/slideDown methods on <li> elements causes some odd results. The following code hides then unhides the items with a class of "hide-show" once the document is ready. These list items lose their bullet point type markers before the text making the whole list look a bit weird. <html> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> // These used to track which site/app is selected
Next Page