validation working on submit, not on changing element
Hello my jquery gurus. I have a piece of code (thanks to someone on this site ) that I'm using to validate some cloned elements. The code is posted below. The code works in the submit function but if I put the code in in the .change selector statement of a select it only works on the original element. It doesn't validate the cloned elements on change. The submit always works. Any help is much appreciated. Thanks in advance, Twitch NOT WORKING: $(".product").change(function(){//update the error
Trying to validate an input text before submitting or placing the cursor in another field
Hi, how to validate an input text before submitting or placing the cursor in another field? I've tried this below but it doesn't work. $(document).ready(function () { $("input").keyup(function() { $("#jander").validate({ rules: { 'coche4[marca]': "required" }, messages: { 'coche4[marca]': 'This field is required' } }); }); }); Regards Javier
Page transition troubles in nav bar?
Hey guys. So right now I'm having a problem with making page transitions work using a nav bar. I have an index.html located in my main directory, called CarneyConnect. Then I have a "pages" subdirectory which includes the four pages the navbar links to. So from index.html, I can load one of the other pages with the navbar no trouble. For example, "CarneyConnect/#pages/video.html" But say I am ON the video page, I can not load any others. If I try to use any of the links in the navbar from there,
Jqeury Sortable - Odd results
Sortable all of the sudden stop triggering update and change, but stop still works. FF3.6. Did have 4 may not have fully uninstalled as it had issues with jqeury in some regards. However... Why does it do this? PHP Code: <div id="sortable"><ul>' . $output . '</ul></div>Is changed to (By selecting a section and then view selection source in FF): <div id="sortable"><ul><ul style="list-style: none outside none;">OUTPUT</ul></ul></div> If I try: <ul id="sortable"></ul>But decides to move the entire list
Firefox3.6(windows 7) and fadein
Hello, I am working on a site www.georgiebeauty.com. In firefox everything set to fade in receives a terrible neon outline while fading. This does not happen in OSX or with chrome. IE7 and 8 have all kinds of problems with the fade in. I am mostly concerned with firefox. I am running supersize.core(a plugin) for my background. Any ideas? I read something about IE7 and fonts not displaying properly after a fadein, is this related?
how to add querystring at Link Url
Hello, As subject, how to add ?x=z (querystring) at the back of the Link Url, only adding a href under id "menu"? example: <div id="menu"> <a href="aaa.html">aaa</a> | <a href="bbb.html?a=b">bbb</a> | <a href="ccc.html">ccc</a> </div> <a href="kkk.html">kkk</a> result: <div id="menu"> <a href="aaa.html?x=z">aaa</a> | <a href="bbb.html?a=b&x=z">bbb</a> | <a href="ccc.html?x=z">ccc</a> </div> <a href="kkk.html">kkk</a> those link already added ?x=z, only second link is &x=z, because second
jQuery 1.4.2 and 1.4.4 break forms - preventing browsers from "remembering" previous values
Normally, if you fill in some form values, hit submit, then press BACK, your previous values are still there. However, if you add jQuery to your form, then browsers no longer remember your previous values. From what I've read this is because jQuery hooks the unload event, and this is a signal to browsers like Chrome and Firefox that the page is not backwards-forwards-cache aware (bfcache). See: http://friendfeed.com/paul/2b7ddce5/jquery-1-3-breaks-bfcache-because-it-binds Is there a fix planned?
Combine two jquery elements
Dear All, Please consider below DIVs both held in a separate jQuery container; $("one") and $("two"). Each container worked seperatly in for example adding blue color to $("one") and red color to $("two"). <div id="one"> Stuff here </div> <div id="two"> Other Stuff </div> If I now would like to add a background color of yellow to both of them; is there any way for me to combine them before doing this and not creating a new selection with $("div#one, div#two") or $("div#one").add("div#two") but var
Icon Flicker in Search
I'm working on a live search for a website, but I'm having an issue. The PHP page is outputting things just as it should be, and the search is correctly retrieving the data from the PHP. It just uses the .load() function. $("#search_results").load(url); Here's the issue. Every result has a 16 x 16 icon next to it, signifying the type of result. Whenever the results are reloaded, these images also reload, meaning that an error image is displayed for a second or so. This is really annoying, but I'm
Superfish menu centering
Hello everyone, I'm having trouble centering the superfish menu at techcommalliance.com. I've tried every kind of auto setting I could think of, as well as most of the other remedies posted in this forum, but to no avail. It_is_driving_me_bonkers. Any help would be greatly appreciated.
mouserOut problem
I have a little problem. On this page you can see a box in the right part. On mouseover, it comes to left. On mouseout it is going back at the initial position. But mouseover it and mouseover the link from that div and you will see what is happening. The div behaves as mouseout. How can I solve this problem?
Can't click the anchor
Hi, I have a problem with my jquery. This is my code: jQuery(function(){ jQuery(".class1").toggle(function(){ jQuery(this).animate({ height: 250 }, 'slow'); jQuery(".class12",this).animate({ height: 250 }, 'slow'); jQuery(".class12",this).slideDown('slow'); },function(){ jQuery(this).animate({ height: 100 }, 'slow'); jQuery(".class12",this).animate({ height: 80 }, 'slow'); jQuery(".class12",this).slideUp('slow'); }); }); The HTML looks like
Superfish is sliding
Hi there ! I'm wondering how can i fix the jquery superfish to a position : in the css, i've positioned the superfish to absolute, with a top and left parameter, but when i resise the browser window, the superfish slides... I don't know if i explain myself correctly, so i join captures. What can i do to fix the position of superfish ??? Thanks a lot !
Please help with jquery and ajax call
Need Help with code jquery newbie [code] <script type="text/javascript" src="jquery.js"></script> <script> $(document).ready(function(){ }); </script> <br/> <b>Select Web Instance to Auto-Populate fields for addition</b><br/> <select id="webselect"> <?php $query=$wpdb->get_results("SELECT DISTINCT instance_name FROM ts_web_layer"); echo "<option value=none >Select</option>"; foreach($query as $row) { echo '<option value='.$row->instance_name.'>'.$row->instance_name
ajax request in 'script' datetype
hi guys i write some program using jquery $.ajax , i want to ask a javascript file from another web-site,the url is 'http://hq.sinajs.cn/list=sz002004' just to get the stock information and show it in my program,but when i wrote this $.ajax({ type:"GET", url:"http://hq.sinajs.cn/list=sz002004", dataType:"script", success:function(data){ alert('hq_str_sz002004'); } }); and i find that the request url
Problem with iPad
Hi guys, I am working on a website where a popout shows when the mouse is rolled over an anchor element. Obviously roll-over behaviour cannot work on touch-screen devices like an iPad. My client requires that I implement device-specific logic for tablet devices (or at least the iPad). I need to assign rollover event conditionally: var rolloverHandler = function() { ... }; jQuery('#navigation a.item').each(function() { var item = jQuery(this); if ( user agent is an iPad ) { item.click(rolloverHandler);
How to change .hover event to .click?
There is an accordion. I try to make it worcking with .click event instead the .hover event. Here's original code: <script type="text/javascript"> $(function() { $('#accordion > li').hover( function () { var $this = $(this); $this.stop().animate({'width':'480px'},500); $('.heading',$this).stop(true,true).fadeOut(); $('.bgDescription',$this).stop(true,true).slideDown(500);
get parent element of div based on div content
Hi, I try to get the parent element of a div based on the div content: ($('div:contains("' + BaseHtml + '")').parent().html();where BaseHtml is the content of the div. but this always return null. How can I do?
jQuery FAQ recommends CSS float property unnecessarily
In the FAQ, under the heading, Why do animations set the display style to block?, a workaround proposed is to set the element's CSS float property [to something other than none]. This may be bad advice, as floated elements have side-effects that may be unwanted* and working around those side-effects can be a delicate art. There is a much better alternative, designed specifically for the task: display: inline-block. This style is supported in all of jQuery's supported browsers, excepting the following:
About textbox cascades problem?
I reference this site's TextBox Cascades. I want to select "personal name" in the first column using select box, and auto match this personal name's email using textbox in the second column. Please help me how to do this? Thanks in advance
Use id's and classes in generated html
I have problem using the generated html from my jquery action. This was the idea: I have a form in which I can add fields on the fly with a button. I generate this fields by javascript so I don't have to reload the page all the time. See code below. I also add a button to delete this fields. this buttons do have an id so I know which field I have to delete. But the problem is that the id's are not found. only if I put the function to delete the field in the function where I add the field it works
Datepicker and new rows..
Hey Guys, I've got this code: $('.datepicker').hover(function(){ $(this).datepicker({ dateFormat: 'dd-mm-yy' }); }); $('.addrow').click(function(){ $('#tableform tbody>tr:last').clone(true).insertAfter('#tableform tbody>tr:last').show("slow"); $('#tableform tbody>tr:last input').val(''); totalrows++; });I basically have a table where the user can add an extra row to input data, that all works fine, the issue that I have is with the
mouse on, mouse off
hi, when i mouseon an image, how can i make it so, the image i'm mousingon and a second image both fade into alternate images, and then fade back out to the original images when i mouseoff? here is an example- http://www.javascript-fx.com/development/ifctest/ifctest.html . any help would be most appreciated.
Can YOU help me with this problem? Web Development using jQuery
Scoured the Net. No one has even remotely tried this, at least not that I have found. Perhaps YOU could be the one to help me with this... First of all, I can use jQuery for the typical, eye-candy slides, fades, tabs, blah blah blah. Yes, this is fun from a Designer standpoint, really fun, actually. Cool as this may be, lately I have found it irritating to try and find a good tutorial on using jQuery for Development. There are some simple ones out there , but nothing too complex. It's all just the
JScrollpane - Dynamic Content?
Hi there. I'm relatively new to jquery. I've been using the JScrollpane plugin that allows you to customize Div and page overflows pretty neatly. However, I'm having a problem when I change the content of the div the scrollpane has been linked to via .text() or .html(). As you can imagine the desired functionality I require is that the Div the scrollpane has been linked to keep the scrollpane if the div 'overflows'. However, I am losing the scrollpane upon calling the function that changes the content
please help with this alert message
Hi, I am trying to determine why my success message doesn't display for a form with PHP/MySQL, even though the data does get submitted correctly. I am alerting the data and get this output - [object Object] not sure what this means? I should be getting data ==1. [code] the entire AJAX/JQuery code is below. $(document).ready(function() { contact.initEventHandlers(); }); var contact = { initEventHandlers : function() { /* clicking the submit form */ $('#send').bind('click',function(event){
Javascript not working when using transition
Hello guys, am facing a problem using jquery. Indeed it is a powerful tool but the problem is when i am using the transition, in this case it is hash transition, the javascript does not work. Please help me
Assigning hover to Ajax data
How do you assign .hover() to data received from an Ajax call? I have a post returning and I wanted to change the bgcolor of the containing div. Posts.aspx <div class="postContainerOut"> <div class="postItem">Column 1</div> <div class="postItem">Column 2</div> <div class="clear"></div> </div>jQuery $("#button").click(function() { $.get("Posts.aspx", function(data) { $("#content").prepend($(data).fadeIn(1000)); // This works //
Callback after calling attr method
I'm using the following code to refresh an iframe: $("#support-link").click (function () { $("#zenbox_iframe").attr ({ src: $("#zenbox_iframe").attr ("src") }); Zenbox.show (); // displays iframe return false; }); The problem is that Zenbox.show () gets called
jQuery load/get function
Hey everybody :D I'm working on an HTML page that is supposed to grab some stats (number of posts, number of topics, etc.) from another page. The stats can be found on this page: http://www.thefacebookforum.net/popup_help.forum?l=miscvars And they're supposed to go here: http://www.thefacebookforum.net/-h68.htm I need to get these stats: 1. Number of topics (just the number) 2. Number of posts (just the number) 3. Number of users (just the number) 4. Newest Member (just the name) 5. Username (just
I need help on this rollover - click events.. PLEASE!!!
Hi, I am trying to use the following code to make a thumbnail change opacity when rollover, and become "light" when "click" on it. Everything works fine except that I need it to become opaque again when a second thumbnail is clicked. Right now if I click on one it became "light" but when I click on a second one both of the thumbnails are "light" and what I want is only the last click to be "light" and the previous one to become opaque if a second one is being clicked..... THANKS!!! $(function()
.filter() on a .hover() function not working in 1.4.3 and above
Why does the filter() portion of this code not trigger in jQuery 1.4.3+? Is there a better way to be doing this? The filter() does trigger and work properly in jQuery 1.4.2 and below. $(document).ready(function(){ $('#list a').hover(function(){ $(this).addClass('on'); }).filter(':first').hover(); });
Mega menu drop down .focus problem
Hi guys, im using a mega men dropdown and inside there a series of ul's. On focus of the top nav the megamenu plugin fires and the dropdown opens.. I can then tab through all the unordered list links inside and it moves across untill it gets ot the end of the navigation. What I can't work out is how I activate the .blur event if the next tabindex is not inside the mega menu.. This is my code to activate the dropdown: $("ul#mainnav li").hoverIntent(config).children('a').focus(function () { //need
Creating a favorite links menu, need help removing cloned content
I have several drop down lists of links with one of the drop downs being a "My Favorites". My intent is that when the user clicks on a star image next to the links, it is cloned and appended to the favorites menu, where it can then be drag and drop sorted. To remove the link from the favorites menu, the user can either click on the "x" button to the right of the link on the favorites menu, or unselect the star on the main menus. I have successfully cloned the link and appended it to the favorites
How can I retrieve a .css() value with Float accuracy?
Hi, I have a jQuery object upon which I am setting the 'top' value using the .css() method. The value is to Float accuracy: $('#example').css('top', 13.857759); Setting the value works fine, and the result in the DOM is: <div id="example" style="top: 13.857759px;">...</div> However, when I go to retrieve the value using the .css() method, the value is returned as an integer: alert($('#example').css('top')) // alerts "13px" Is this an intentional quirk of jQuery, or considered to be a
Change background
Hi guys, I'm ttrying to chance the background image of a DIV when an image is clicked in other div. So i'm using this code: $(document).ready(function(){ $(".portfolio #page #content #menuPortfolio ul li img").click(function(){ var imgArea = $(".portfolio #page #content #imgGrande"); imgArea.css("background", "url(../images/fotos/"+$(this).attr("id")+".jpg) center center no-repeat"); }); });My CSS is: .portfolio #page #imgGrande{ width:460px; padding:5px;
Possible to resize background-image?
I have a Div chaning size accroading to the browser's dimension. I'm using a css method background-size:auto to controls the background-image fully fit inside that Div. But I just found out this css trick does not support in IE6. So I'm wondering if jQuery able to control the size of background-image?
Update image source inside UI dialog after dialog has been opened.
Hi all I have the following function: function imageSwap(imgPath){ jQuery("#bigimage").attr("src", imgPath); } which is called by: <a href="#" onmouseover="imageSwap('images/upload_pic/resize_<?php echo $image->image;?>')"> <img src="images/upload_pic/thumbnail_<?php echo $image->image; ?>" border="0"> </a> The basic idea is that when you mouseover the thumbnail, it calls the function that replaces the src of image element "bigimage"" <div class="popup_image">
html() on div
Hi there, i have i problem, im loading div through html() by button but, i have 10 div's with the same name and 10 buttons (php + mysql page, comments), and it always loads on the first one on page. There's my script: $(function() { $(".vote").click(function() { var id = $(this).attr("id"); var name = $(this).attr("name"); var dataString = 'id='+ id ; var parent = $(this); if (name=='up') { $("#votebox").fadeIn(100).load('include/voteup.php'); } else { { $("#votebox").fadeIn(100).load('include/votedown.php');
getting caret position in a contenteditable div
I can't seem to find this anywhere. I'm using a div with contenteditable=true, and I need to know where the caret is for operations like splitting the html contents of that div where the caret is. Ultimately, if a piece of text is selected, I'll want to split that html content on the selection start / end. jCaret only seems to work for textareas. Is this possible in a div? thx
Next Page