Help - accrodion/expandable nav not displaying elements of expanded ul list
Hi everyone, I have spent 2 days banging my head against the jagged edges of this code. I and trying to create a ice expanding menu on teh left side of my site. I have jquery working in other places for others thigns but for some reason this one piece wont work correctly. I have my list of nav elements being printed nicely and when I click on an item it appears as though ti tries to expand the sub element but there appears only a very thin line. All of the elements of the sub ul are not showing.
getting only matched element with clone()
Hi, I'm a starter in using jQuery and I decided to work my way through the 'Learning JQuery' book from packt. Somewhere in Chapter 5 they use the clone() function with the false attribute. The JQuery version used in the book is 1.1.3a. With the clone(false) method the writer can clone only the matched element and not the descendants. And that works in 1.1.3a. I know that this is no longer the case in JQuery 1.4. Boolean is only for Event Handlers. But what is the new equivalent of this method? In
How do I pass events around without breaking encapsulation?
Hi, I am wondering how I can create an object or two and have them communicate through events, while not having them rely on each other. I am building an image rotator that auto advances the images as well as a clickable interface to select images. I want the image rotator object to tell the interface object which image it's on so that the interface can change style accordingly. The only way I see to do that is with the .trigger() event handler. This seems like it would break encapsulation. Am I
Ok Smarty Pants...Here is one for you!
This code works great, it is highlighting the rows in my table. However it is not fading in slow. The highlight just pops right up! I am expecting it to fade in slowly like I have it defined. Why is this??? $('#striped tr').mouseover(function() { $(this).fadeIn('slow', function() { $(this).addClass('highlight'); }); });
How to fire an event after cutting a text from textbox ?
Hi all, i have bind a cut event for a textbox in asp.net using jquery. intially, i typed a text in textbox is "dotnet program". now, i cut the text "programming" from the textbox. while cut event i cannot find the latest text from textbox(i mean only the text "dotnet"). If i get text from textbox while cut event i can get only the full text from the textbox.. how to get the modified text from textbox? i found there is beforecut event is available in jquery.. is there any event lik "aftercut" in jquery?
Memory Leak (Windows CE 5, IE)
Running some code on Internet Explorer on Windows CE 5 and getting the following error: http://support.microsoft.com/kb/922952 It suggests I "release all dynamically allocated event handlers in the onunload event for the Web page," which I thought would be accomplished with: $(window).unload(function (){$( ** selectors for most all bound objects ** ).unbind();(Not all bound objects, because I have a bound 'back' image/link that I can't unbind - but everything else) However, I'm losing a not insignificant
Over Ride Return False.
I would like to code a drop down navigation where the top tier of navigation links is NOT clickable, only the child elements. I am wondering how I would go about coding this using Jquery. Here is my code so far. $("#menu ul li").click(function(event) { $(this).find('ul').css('display','block'); return false; }); $("#menu ul li ul li").click(function() { return true; }); The reason this doesn't work is because it makes ALL the links "return false". The second function
Using $.ajax and how to get the back button/link to work with asual adress??
Hi, I have a result page loaded with jquery/ajax in a div, when i clicked the see details of one of the results i load the details in the div. But now when you hit the back button it doesn't go to the previous results?? I found this; http://www.asual.com/jquery/address/ but i don't see how i could incorporate this as i am calling a javascript function, This is a javascript function which is called onclick from each result in the list At the moment a see details link looks something like this <a onclick="javascript:
Not working IE but all other browsers
Hi All, I am using the following in a site (works fine in FF, SAfari, Chrome) but not IE 7 or 8! Seems like it isn't even loading the jQuery at all. I have 3 separate div's which are clicked on and in turn open there 3 corresponding div's with the content. All on a single page. Can anyone offer me any advice as to why this isn't working in IE? I have debugged in FireBug which finds no issues, I also get no errors in IE just does not work... Thanks in advance. <!-- jQuery --> <script src="javascript/jquery.js"
Triggering Evaluations after a Refresh or Back Browser Button
Here is the background. I have a large form that uses jquery's .change to rewrite html select forms, make some calculations, etc. It works great if I don't reload the page via a refresh or a back. If I click back or refresh it doesn't change some of my form's selections, but all of the jquery generated stuff doesn't recalculate. Is there a way I can trigger a re-evaluation? I tried $(document).ready(function () { ... (#id).trigger('change'); ... }); But that doesn't do it.
jQuery and entities.
Hi to all, Well before I start I wana say that i'm new to this so don't expect much out of me. My problem is : When i send info from a form to the database in a textarea box i type caracters like á,í,ó,ú,ñ but in the database they are saved like á,ó,Ã,ú,ñ. The form i use is the one bellow: Titulo <%out.println(k.getTitulo());%> Descripcion <% out.println(k.getDescripcion());%> More info : I use .ajaxSubmit() to submit the form. I use jsp technology to proces
Difference of "live" in IE vs other browsers
I use the following two functions to create dropdown lists in a table, then once an item is selected from a dropdown, the list disappears and shows the selected item. In most browsers, it works fine, but in IE the dropdown appears but does not disappear when the item is selected (the "change" event doesn't work). I know there is a jquery bug report similar to this, so I suppose my main question is, does anyone have a better idea as to how to achieve this functionality in IE if it truly is a jQuery
jQuery RIA framework (DWZ RIA framework)
jQuery RIA framework (DWZ富客户端框架) DWZ RIA framework All Component (menu / grid / trees / dialog / tab /alert ...) only use jQuery core librariy, not required other libraries such as ExtJS. DWZ RIA framework will be open source. Online Demo http://dwz.duqn.com Download http://code.google.com/p/dwz/
Multiple checkbox toggle class
Hello, I hope someone can help. I have some jQuery code to add and remove a class to toggle an image. It works for one but now I want it to work if I add other checkboxes. Currently all the checkboxes change the 1st div. I would like to make it toggle it's respective div. Any help would be great! Thanks in advance! <html> <head> <title>jquery to Show/Hide a Div</title> <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.1.min.js"></script> <script type="text/javascript"> $(document).ready(function(){
how do i build a dynamic selector
I'm having some problems creating a dynamic selector. I'm using the BeautyTips plugin and i can attach a tooltip to a div by using the id of the div, for example: $('example2').bt({ // attaching to one element by id contentSelector: "$('#example2-content')" // this will return, as the tooltip's content, what's in example2-content }); This works well BUT: how do I make the content selector dynamic if i need to attach a pop-up to multiple images like this: $('#test img').bt({ // i'm selecting
Can someone help me understand the following block of code
Here's the code: $(document).mouseup(function(e) { if($(e.target).parent(".panel").length==0) { $(".trigger").removeClass("active"); $(".panel").hide("fast"); } }); I've got a click event attached to an anchor tag that is toggling a panel (the full code is below). I want to be able to close the panel by clicking anywhere outside of the panel as well as the toggle event on the anchor tag. The above mouseup function sort of works... but any divs
$.ajax not calling webservice
Hi All, hope someone can help. I'm trying to call a WebMethod in a webservice via jQuery AJAX but it never seems to fire success or failure. I want to build an HTML table and display results based on what's been typed into the textbox onkeyup. ASPX: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FilteredGrid.aspx.cs" Inherits="CH_Bargains.FilteredGrid" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"
Script error in IE
I have the cdaccordion and scriptegrator in my resume page that uses jquery 1.4. It works fine. I use the hot joomla gallery that uses jquery 1.3 and it throws a script error in IE. I can't find out what it is. I tried loading the script 1.3 in the head and took out 1.4, or basically disabled jquery in my accordion so I could figure out the problem with the gallery, but I think it is just the gallery and no elimination or substitution of the scripts are working. Maybe someone here knows what is
slideUp problem in FF Mac
I have a simple script that collapses a footer when clicked, it works fine in all browsers except FF3 on a Mac where the text jumps to the left and back again. Is there a resolution to this? Beacuse of the page's layout I need to keep the margin as they are. Construction site: http://wicomsnew.jerram-clients.co.uk/ Click on 'learn more about Wicoms' just above the footer.
container with animated box that appears from below it
I am having trouble conceptualizing how to have a containing box with a set size, and another box, much longer, that would animate from below it's containing box till its top meets the containers bottom edge. I am having trouble figuring out how to approach this, mainly with the css, but I have a feeling too with the jQuery. I have used jQuery a bit, and am experienced with HTML and css, but I can't figure out how to do this. How would those elements be positioned, and would I use .animate()? Any
Bug with $('select option').hide()
Hi there. I've discovered that the code in subject doesn't work in any browser except firefox. Here is minimal html with the bug: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>select test</title> <script type="text/javascript" src="jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $('input').click(function()
i have a doubt
Hi All, <div class="input"> <input type="checkbox" value="1" name="user_fav_band_posts_show"> <label>Notify me when my favorite bands post a new show.</label> </div> When user click on "label" i need make checked above check box Any idea. please help me... Thanks Shemeer
how can I select a specific class inside a specific div based on the ID from a button elsewhere on the page
<div class="box top"></div> <div class="box main"> <div class="box header"> <div class="badge"><ul><li class="active"><span>60</span></li></ul></div> <div class="calendar_icon"></div> <div id="mytoggle"><ul> <li class="expand boxminimize" rel="_calendar"><span>Calendar</span></li></ul></div> <!--/tabs--> </div> <!-- Left Column BODY --> <div class="minimizer_calendar"><div id="calendar_wrap"> <div id="calendar"></div>
Autoresize div to fit inner image
Hello, I write a plugin to resize the outer div to fit the image (so that the caption wraps properly). The markup is something like this: <div class="image-container image-center"> <a href="url/to/orig"><img src="url/to/scaled" alt="Caption"/></a> <div>Caption</div> </div>My jQuery code is: // Auto resize div container of image (function($){ $.fn.autoresize = function() { if (this.width() > 0) { this.parent().parent().width(this.width()); } else { setTimeout(this.autoresize(),
parsing xml and e4x support
Hi - i tried to post this earlier but it didn´t seem to take. Hopefully it works this go round... I am new to jquery/javascript coming from a as3 background. and i am trying to figure out the best way to parse my xml... i absolutely love e4x, cant really imagine living without it, but i´ve seen a bunch of stuff that says it doesn´t work on explorer. obviously if i need some nodes from an xml file it does me no good to do it twice - once for explorer and once for other browsers - so i am stuck
delay() and click() issue
This is probably a simple issue that I'm simply executing improperly, but here goes -- I'm trying to display an alert message (a div with text) that fades in, and after 6 seconds fades out automatically. That's easy, but I also want to allow the user to close the div by clicking on it if they so desire. The problem is, the delay() function overrides the click, or so it seems -- clicking does nothing unless I remove the delay(). Here's the code I'm using: $("#alert").fadeIn(600);
Help with ajax success!
Hi all, im using a class plugin for use class with Jquery..like this: var sendstatus = jQuery.Class.create({ init: function(){ this.message= ''; }, send: function(){ $.ajax({ type: "POST", url: "ajaxdispatcher.php", data: {'status': this.message }, success: this.send_success( responseText ), }); }, send_success: function(text){ alert(text); } }); I have this error: responseText is not defined.... Can someone help me?? Many many Thanks! Steve
jQuery not calling elements in if statements
Hi Everyone, Haven't some problems. The jQuery isn't working when calling elements placed in conditional statements. My sample code is shown below. This code works beautiful if the if/else conditions aren't there. What is the problem? Is there something wrong with my code? Is there a workaround? I absolutely need to use a conditional statement in my production code. <?php $test = 'true'; print " <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">
JQuery Animation
Hi Guys, i want to do some animations with JQuery, but i dont now how to do them exactly i have a main div (width:960, centered) and i want to let divs fly in form all sides is it possible to place them outside the content div and let them fly in (they shouldnt be seen before they "entter the stage").Would a resize (width: 'show') be the solution? whats the best practice. Or should i switch to flash.... I read the dox but i couldnt find an answer to this specific problem does anyone of you have an
run funtions in specific divs only
hello, I am rather new at all this jquery goodness so please bear with me I am in the process of making some basic alterations to this image slider http://css-tricks.com/moving-boxes/ I want to run multiple instances of it on the same page but if I can't make it work. at the moment if I have 2 sliders then both sets of buttons control both sliders see... http://www.redweather.co.uk/newDesign3/CopyOfPortfolio2 I know that I have a specificity issue to address here but am not sure of the correct technique
How to bind an event to any elements except one?
Hi, in the language menu shown below, I would like to show the "current_menu" when it's not visible and clicking on the "current_page" element, and to hide it when clicking everywhere except in the "current_menu" element. I tried with the "not" selector: $(":not(#current_menu)").bind('mousedown',function(event) { $("#current_menu").hide(); event.stopPropagation(); }); I expected it to be "bind this event to all elements except "current_menu", but the event is still triggered when clicking on the
Newbie with question
I am a newbie who has started using JQuery last week. My question is in regards to JQuery Scope. I am making an JQuery .load call when a user clicks on a button. Instead of calling an HTML page I am calling a struts action class which will forward to an JSP page. All this works great. The returning JSP is basically a simple table that gets injected into another <div id=> tag which is defined in my main page. After all this happens I am trying to apply zebra strips to the table. This is not
How to parse Ajax HTML response?
I am using jQuery for ajax call and receives HTML as a response. Response I am getting is <TR> <th> Employee Id</th> <th> First Name</th> <th> Last Name</th> </tr> <TR> <TR> <TD>1</TD> <TD>Debopam</TD> <TD>Poddar</TD> </TR> I would like to parse this response and fetch "1","Debopam" and "Poddar" from the response HTML. How to do this and is there any way to parse it using jQuery selector. I don't want to use split.
can you including .js files in .js files?
Hello all - can you include a .js file in a .js file? for instance can make a file utils.js that has various methods i am going to use over and over and then some other files.. myplugin1.js myplugin2.js ... where the methods internal to these plugins use the methods in utils .js. --- as a related question. is there a way to mimic class structure? for example say i have utils1.js and utils2.js and they both have a method called "hello()" id like to be able to be able to include both .js files
Of Tables and Toggle - Do somethin only if parent has child.
Hi everyone! I've successfully set up a table with toggling rows and alternate colour, and everything is working decently. Now, I've tried to do a further step by trying to style the parent row who do have child differently from those who don't, so that the user immediatly knows where clicking will bring result and where not. How can i do it? I've tried with the :parent selector but nothin, still keep looking all the same. Here's my starting code: <script type="text/javascript" src="../catalogo/js/jquery.js"></script>
Remove border on A:hover when it contains an IMG
I imagine this is trivial - in fact it must have been asked before, I just can't find the answer. I have looked! :-) I have a dotted bottom border defined on my link hovers, like so: <a href='#'>Home</a> a:hover { border-bottom: 1px dotted #000099; } But on links that contain images, I want to remove the border. So, <a href='#'><img src='home.png'></a> Should have no border-bottom. I've tried: $('a:hover img').parent().css('border','none'); in the document.ready(), but that clearly is not
Inconsistency in behavior on different browsers.
I have problem with inconsistency between firefox 3.5.8 (Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.9.1.8) Gecko/20100202 Firefox/3.5.8 (.NET CLR 3.5.30729) and IE 7 (7.0.5730.13). When I select radio button in firefox radio button remains checked. In IE after first click on radio button button is unchecked. You have to click second time on it to check it. Source code attached.
reload component
Hi, i got a page with 2 <select> the second one is populated by the 1st selected item. I want to know how can I reload just the second <select> any Idea?
preventing pageup/pagedown events for page scrolling
Hi All, I am using jquery in one of my projects. I have a scenario where I have to add keyboard events to the td cells of a table to move up and down in them. I was able to achieve this using the following code. <script type="text/javascript"> var tds = jQuery("#myTable td"); tds.bind('keyup', function(event){ var key = event.which; moveSelection(key, jQuery(this), tds); event.preventDefault(); }); function moveSelection(key,
Problem with deleting records using jquery with classic asp
Hi I'm using jquery to pass trough data to another page where I want to insert and delete a record. But the problem is that jquery only inserts or deletes the records and not both together. I use following code: For jquery: $(document).ready(function(){ $("#btnAddPayment").click(payment); }); //example 1 function payment(){ $.ajax({ type:"POST", url: "acceptPaymentExecute.asp", dataType: "application/x-www-form-urlencoded", data: "amount=" + $("#amount").val() + "&reason=" + $("#reason").val() +
Next Page