onmouseover/-out of DIVs: changing css of the child-elements
Hello, I have several DIVs with a specific class. With BIND, or a EACH-function I want to get a hover-effect to change the P-child-element of the DIVs. But something like this doesn't work: $("div.classLabel").bind("mouseenter mouseleave", function(e){ $(this + " p").toggleClass("over"); }); How it is possible to change the child-element of each DIV? Carlos
Get text and select values
How can I copy the contents of a div and put it into a textarea while changing the select tags for the chosen option? Example, take the following HTML: <select><option>am</option><option value=":abbr: title='Ante Meridium' lang='en':AM:/abbr:">Ante Meridium</option></select> going to visit the <select><option>US,</option><option value=":abbr: title='United States' lang='en':US:/abbr:">United States</option></select> with all the rest of <select><option>us</option><option value=":abbr: title='United
Safari Code Timing Problems
Okay, so I have the below code on a site I have in development, a fairly simple function that resizes some images in a gallery, tweaks a bit of CSS and then is run in a $(document).ready function. It works fine in Firefox, but seems to have bugs in Safari. Sometimes the pic_height and pic_width variables don't seem to be set properly, and that causes sizing problems throughout the function. Where it gets weird/frustrating is as follows. When I use Safari's debugger, set breakpoints and step through
How to display all values from inputs?
For example, I have <input type="text" name="timeof_day" class="timeof_day" value="1" /> <input type="text" name="timeof_day" class="timeof_day" value="2" /> <input type="text" name="timeof_day" class="timeof_day" value="3" /> <input type="text" name="timeof_day" class="timeof_day" value="4" /> <input type="text" name="timeof_day" class="timeof_day" value="5" /> How do I get all values individually of $("input") or $(".timeof_day") or .. you name it.
Using Production Compared to Development Version For Building Your App ?
I just want to ask what people use ... Production or Development Version for building their apps ? I use Production. Please let me know why you think this is wrong or why you disagree with this.
JQuery Accordion IE7 problem
Hi, I'd love some help please... I am using a JQuery accordion on a charity website. It works fine in other browsers I have tested but not in IE7. Instead of opening when you click on it (to reveal the submenus) it closes them or doesn't work. This only appears to happen in IE7??? http://www.iecreativeltd.co.uk/preview/bham_settlement/ Would someone please help me and explain where I am going wrong. Many thanks, Chris
[jQuery] [treeview] async treeview => reload branche...
I am using the async treeview to list all manageble elements on a site. This means that if the user edits an item and, for example, changes its title, this should reflect in the tree. Also moves and deletes should reflect in the tree. Because my forms get posted with ajax I need to update the tree myself. Is there a relativly easy way to reload one or more branches from server? B
unable to select an item from select box using select name.
I am using following code to select an item from select box dynamically.But its not working. Can anybody help me on this.I know we can use id here, but i need with name. $("select[name='temp_name'] option:eq('bb')").attr(" selected","selected"); select box is like this. <select name='temp_name'> <option value='bb'>bb</option> <option value='cc'>cc</option> </select>
.hover is not working correctly..
$j('div.LeftNavArrowRt').parent().hover( function() { var selector = ".sub_" + $j(this).attr('id'); $j(selector).css('top', $j(this).position().top).animate( { width : 'show' }); }, function() { $j(".sub_" + $j(this).attr('id')).hide(); }); I am using jquery for my vertical hover menu, but the menus don't behave consitently and somtimes hide on hover out and sometime don't. In the code above I select parent divs of the divs that have an right pointing arrow j('div.LeftNavArrowRt').parent() and
How to get a HTML attribute value from a HTML element using jQuery?
I've got a bit of jQuery where I'd like to get the height and width attributes from an img tag, the way they were when the page was loaded, not what is ends up being when it is displayed. I suspect I've made jQuery a bit of a golden hammer in this case, but is it possible to get those values or even recognize that they were never provided in the actual HTML tag. i.e. <img src="image.jpg"/> should detect that there was no height and width on the actual tag.
.val(value) and ASP.NET TextBoxes
I have an ASP.NET TextBox with AutoPostBack=true. When I run $(myInputElement).val(value); in Internet Explorer 8, the AutoPostBack no longer works. I'm guessing that the problem lies more with IE8 than jQuery, since none of the other browsers break, but I'm curious if anybody else has seen this problem or knows of a workaround?
stop() function does not work correctly
[edit] i moved this post to using jquery, hope that here are more people so that somebody of them can helb me. Thx anyway [/edit] http://forum.jquery.com/topic/stop-on-a-fading-element-don-t-work shows one question, in my opinion its a problem. $(".menuitem").hover( function(){ // $(this).stop(True,True); $(this).fadeTo("slow",1); }, function(){ $(".menuitem").stop(True,True).fadeTo("slow",0.5); } ); in my case all menuitem
...the selector for my case ?
<tr> <td>3</td> <td class="tTB">Some text...</td> <td class="tTB">Some text...</td> <td class="tTB">Some text Some text Some text <span>SPEC. TEXT</span></td> <td class="tTB">Some text...<span>SPEC. TEXT</span></td> <td class="tTB">Some text...</td> <td class="tTB">Some text...<span>SPEC. TEXT</span></td> </tr> question: $('.tTB').live('click',function(){var SPECTEXT=$(this).??("span").html();}); How i get the "<span>SPEC. TEXT</span>" in the var?
jquery: simple ajax problem
Hey Peeps I have this jquery function which works like a autocompletion, much like facebook or google autocompletion. Code: $("input#search").live("keyup", function(event) { if (SearchValue != "") { //About ajax request $.get("search.php", { text: SearchValue, framed: "1" }, function(data){ //console.log(data); $("#main_menu_search #main_menu_search_results").html(data); $("#main_menu_search #main_menu_search_results").show(); }); } else { $("#main_menu_search #main_menu_search_results").html("");
How to toggle img inside another div, when mouse hover that div?
Good day, I've been trying to solve this problem for ages, but no luck so far. I couldn't find any information how to toggle img inside another div, when mouse hover div. Scenario: I have one big img let says width="600" height="400" and inside that div are two buttons which will show and hide according mouse position (when mouse is over photo then show navigation's buttons, when mouse is out then hide navigation's buttons). To get better idea, one big img as a photo and on left side button as navigation
Is the second declaration redundant
Noticed following lines of jQuery. var events = elemData.events = elemData.events || {}, eventHandle = elemData.handle, eventHandle; I was wondering if the very last declaration of variable eventHandle redundant in this case. or am I missing something?
deleting textarea values from a form
Hello, I have a simple, three-field form that I am setting default values from within my jquery script. When a user clicks on a field the default values are removed, leaving that field blank for the user to type into. The form accepts the default values from my jQuery script just fine. And when I click on the "to" and "from" fields, the default text is, in fact, removed. The problem is when I click on the textarea, the default value does not get removed. Any thoughts? Here is my html: <form class="blogForm"
Looking For jquery TABS with a slider for each tab
I am new to jquery and need help locating a particular combination of a TAB and SLIDER function. I find plenty of great tools that do one or the other. I want to create a section on my site that would have 5 tabs and for example one of the tabs be titled "PRODUCTS ON SALE" and then when you go to that tab, it opens showing 4 products with each product to be an html block of the products: image, title, description, buynow button). Then I want my visitors to be able to slide in a new item until
problem creating a html string from $("div.winsection>div.blockTitle").eq(intIndex);
Hey. I am pretty new at this. my problem is as follow: I have several blocktitles in my html. I want to create a menu from these. I use the code below to add them. But when i try to put them into the menu i just writes [object Object] instead of the block title. What am i doing wrong here ??? var menutext = ""; $( "div.winsection>div.blockTitle" ).each( function( intIndex ){ menutext = menutext + $("div.winsection>div.blockTitle").eq(intIndex); menutext = menutext + "<br>"; } ); $("div#automenu").html(menutext);
Auto Expand textbox does not work when using with CSS
For some reason the following code does not work if I use CSS in the AJAX TextWaterMark control. $(document).ready(function(){ $('.expanding').autogrow(); //use the following code if I figured out how to get jQuery to recognized repating same Div ID //$("#commands").hide("normal"); }); And ASP.NET code: <asp:TextBox ID="txtNotes" runat="server" CssClass="expanding" Text='<%# Bind("notes") %>' TextMode="MultiLine" Width="96%"
customizing tabs
Hi, I'm new to jquery and this forum. Hopefully this post is in the right place... The issue I have can be seen live here: http://dnfgraphics.com/cypress/ The accordion effect works great, but the client wants the first section to be filled with text across the entire area, while the other sections have an image (the tab), then text to the right of it. As you can see, the content in the first section 'blinks' because the img/tab hides it. it's left-margin is set to -90px so it can overlap the tab
Using jquery for traversing XML - problem
Hi all! I'm using jquery to traverse an XML nested in my HTML page. Don't ask why :) I simply have a scenario when I have to deal with XML on client side a lot. So, I figured I would use jquery for traversing and manipulating this XML. Everything works perfectly fine with Firefox. But it fails for IE. Consider this HTML: <div id = "mydiv"> <p> <span> span 1 </span> <span> span 2 </span> </p> </div> <div id= "xmldiv"> <node> <subnode>
code idiom, style wrt dollar sign
I've noticed that some jquery coders use a dollar prefix on certain variables. Is there any particular idiom or code style that is relevant, e.g. use a dollar prefix if (and only if) the variable is holding the result of a jquery selection? Is there a recommended code style/idiom doc anywhere?
Synax error .animate
Hi Guys, I've been scratching my head over this for most of the evening now and it's probably a simple solution. I've been using this jQuery for most of my websites for some time now, it's the simple slideshow The problem arises on the this website http://www.kellykuseldesigns.com/ (I know not the cleanest website in the world) And it get the following syntax error Error: syntax error Source File: http://www.kellykuseldesigns.com/ Line: 45, Column: 17 Source Code: .animate(, 1000, function()
Simulating <a href="#">
Hey all, I'm attempting to simulate a link with jQuery. For example, if I simulate an href of www.example.com to a class "logo", then every image that I add that class to should allow me to go to www.example.com on click without having to code the anchor tags in HTML. Does this make sense? Does this sound doable? How would I go about doing this? I'm going to continue to research this. Any help would be greatly appreciated. Thanks, --nks
Full page peel
Hello, I'm looking for a way to go from one page to another, with a peel effect. Not just a small peel effect to make a advert appear, but a full peel effect. When a user click a link, the current page roll, and a full new page appears, as if he was using a book. Is it possible with jQuery ?
Delete a function
Hi there, I am writing some HTML/Javascript which is embedded into a page at load up. The page is predominantly created by the external application and this means that the code it produces can not be altered. I have been having lots of difficulties getting jQuery to work. Today I realised the problem. The wise people who created the other javascript which is included before I source jQuery adds methods using the prototype function to Object, String and Array. The trouble is that it is not namespaced.
Mouse effects while sending Ajax Request
Hi, I am developing a website with the help of Jquery for sending Ajax requests etc. I want to show a loading Image along with Mouse while a Ajax Request is processing. For example if i am sending a ajax request to the other php page, i want to disable mouse pointer and show a message along with mouse pointer that the content is loading. I have shown a loading message something like Gmail's loading message however not able to do this mouse stuff. Can anyone help me out with this. Thanks
slideToggle is being inconsistent
I am using slideToggle in a web form. The intended result is to have a checkbox that, when checked, reveals more nested options. Every nested option should be hidden by default. This works some of the time, but with the exact same code, at other times it just shows it by default, and checking the box makes it go away. The web form is in ASP, but all the ASP works fine. "createCheckboxJS" is a function that basically creates a working checkbox that takes on the characteristics of any Javascript
Nav to stop, and close till I click on close botton
Hello every one. I was asked to implement this nav to this Website I am working for http://decormouldings.org/hover-nav.html I made this mock up with all the code included in, so you can see how this script works. But now the owner of the site wants the Nav to stop once is clicked, then have a close botton to close the Nav. Right now the Nav works, that if I hover ontop of it, it opens, and stays open for a few secs. But now, he wants it to stay open, till I click a close botton. I am not (for now)
populate input fields with table data
How can I use JQuery to, when clicking a row of data in a table, take that row (consisting of three columns) and populate three different input fields with it? $('#tableRow').click(function() { $('#input1').val() = ?; $('#input2').val() = ?; $('#input3').val() = ?; });
Selecting Elements
Hi I have a doubt, Please clear me this doubt if some one have any idea. Is there any better way to use the selectors (div[id$=''] , div[id ^= ''] , div[id *= ''] ). I am using this way at so many places. I know this way of selecting the elements will be much expensive.Please let me know if there is any other better way. Note: I do not have the complete ID, that's why I am using this way. Please let me know if you have any way to use. example that I used: ("input[id$=reporter")
IE not playing ball with animation
Hi, having aspot of bother with ie and a simple animation. Demo can bee seen here... http://www.littlepond.co.uk/client/THE0039/shop/default.html Chrome, Safari, Opera and Firefox are all happy just IE will execute the first animation - mouse over any other li and its as if IE has added overflow:hidden to each li... any pointers would be most welcome. Thanks everyone.
add delete table rows
I have a table in which I have 3 columns. On the firs row, last column contain a button "save". On clicking Save, the button saved is changed to a delete button and it has to insert a new row above the row. On clicking the button delete, the row has to be removed. How can I do this?
accordion issue
Hi, I'm new to jquery and this forum. Hopefully this post is in the right place... The issue I have can be seen live here: http://dnfgraphics.com/cypress/ The accordion effect works great, but the client wants the first section to be filled with text across the entire area, while the other sections have an image (the tab), then text to the right of it. As you can see, the content in the first section 'blinks' because the img/tab hides it. it's left-margin is set to -90px so it can overlap the tab
Sortble demo not working
I am having problems using the sortable function. For me the demo from here does not work: http://jqueryui.com/demos/sortable/default.html Is the demo broke or is someting on my computer?
2 jquery functions not working
I need some help about an issue. i.e i am loading the contents (from php files e.g xyz.php) when any menu button is clicked to the content_area (div) on the index page using ajax and jquery. now when i add some ajax/jquery to xyz.php it doesnt work when page is loaded in index.php. if i open xyz.php independently everything works. what am i doing wrong?
Uncheck radio and checkbox buttons
What's the cross-browser way to uncheck an <input type="radio"> and <input type="checkbox"> elements? Whatever I do, it'll do nothing in IE6: $theElement.attr("checked", false); $theElement.removeAttr("checked"); $theElement.get().checked = false; In IE7, checkboxes get unchecked with all these methods but none work for radio buttons. In all other browsers, they all work fine.
nth-child but only on some children
Hi! I have a div called "myDiv" which have some children. I want to write a selector that takes the n-th children but ONLY chooses from those with the class "specialClass". Anybody knows how to do this?
.is() = overhead?
issue: if($("#sometooltip").is(':visible')) { $("#sometooltip").remove(); } I'm wondering if it is useful to use the .is() function in spots like that. Will .remove() check if the element is in the DOM for itself?
Next Page