jQuery and CSS loading into DIV
My question is, why am I losing the ability to capture the values of the form fields when CSS repositions them. My problem is as follows: function loadAuthors() { $("#authors-list").load("authors_get.php"); } authors_get.php has form elements in <input fields> it. If I post the page on first load, all the form elements submit. If I apply CSS to the page and float the element to a new location, the value of the authors-list is no longer captured in my post. Work around is to create a hidden form field
load(); Problem
Hi all, I am using load(); to do an auto refresh for a single div every 10 seconds. That div contains an inner div, which is style="display:none;" by default. After the first auto refresh I want to style="display:block;" that div. Here comes my code: JS: $('#messages').load('http://localhost/surcle/requests/update_messages.php); document.getElementById('message_1').style.display = 'block'; HTML: <div id="messages">...<div id="message_1" style="display:none;">...</div>...</div> However for some reason
column's cell value split and match the result....
$('#<%=GridView1.UniqueID%> td:nth-child(5):contains(08)').closest("tr").hide(); I need to split the string of the fifth column cell in order to get the hour value, and those cell which match the 08 o' clock will hide. the cell value is '3/22/2010 08:00' , '3/22/2010 07:00', '3/22/2010 18:00' and so on.... what I've had tried is $('#<%=GridView1.UniqueID%> (td:nth-child(5).split(" ")[1]).split(":")[0]):contains("08")'.closest("tr").hide(); but is not able to get the result I need.........
Question on Lightbox image uploader
Hi Guys, Here is what I am trying to do: I have various images on a page. I want to edit an image. So, I should click on the image and a lightbox should appear asking me for a new image files to upload. I select an image and click upload. It uploads the file and then the lightbox closes and the original image on the page gets replaced by the new one. Now, I have looked around for jQuery plugins and examples to do this but I cannot come across something that can help me. I am kind of new to jQuery
dialog box mailto
Hey there, I'm new to the forum and jQuery in general I'm trying to get a dialog box button to use a mailto: function Here's about as far as I got $('#dialog').dialog({ autoOpen: false, width: 600, buttons: { "Compose New": function emailForm(){ var email = "email@email.com"; var mailto_link = 'mailto:'+email; }, "Cancel":
accessing DOM within callback function
I'm trying to use a .load to dynamically create a <select> dropdown, and then within the callback function, set the option of the just-created select. I had this: $("div#system").load('systemdata.php',null,function() { document.getElementById('systemid').selectedIndex=0; }); The systemdata.php script outputs this: <label for="systemid">System:</label> <select id='systemid' name='system'> <option value='54TH-01'>54TH-01</option> <option value='54TH-02'>54TH-02</option> <option value='54TH-03'>54TH-03</option>
Toggle row using button below it in a table
Hi, I cant seem to get this to work. I have 2 rows in a table, the first containing a paragraph of content and the second containing a button. I want it so when the page loads the first row (paragraph) is hidden until the user clicks on the button, which will then display the paragraph (toggle on and off). If the rows are swapped round so paragraph below and button on top this piece of code works fine but for the way I need it, it doesnt. <!DOCTYPE HTML> <html> <head> <title>Testing
parsing ajax response
Hello I have the following ajax request function ajaxfunc() { $.ajax( { type: "get", url: loadUrl, data:"param=" + param, datatype:"html", success: function(data){ $("#post").html(data); } }); } Now I want to compare a variable from the server and do other stuff with the output before showing it in '#post' How do I do that? The server page is jsp
jQuery Get Commands
Hello, I have just recently started using jQuery. I am trying to create and index form that asks you to select an option from a drop down box. Once that is selected jQuery pulls data from a php page and pastes it into a div. Once that has been done there are more options available in a select list. Once you select one item the select list beside it fills is more data, so on and so forth. It script will complete the first query but then when i attempt to run the second query it give me a js error
Megadropdown problem when adding .click to a li dynamically
Newbie problem here. I'm looping through a set of li's looking for li's with the class "drop" and adding click events to them dynamically. When a user clicks the li's I show a div class"megadropdown" that is placed inside the li (yes I know, not valid html). But since I have placed the content I want to drop down inside the li's the click event seem to attach itself to the links inside the megadropdown as well. The reason I placed the megadropdown div inside the li was the eleganse of the code, allowing
Click Event in IE6
Hi Folks! I got serious problems with Click Event and Internet Explorer 6.0. $(function() { $("#button").click(function() { $("#layer").animate({ marginRight: 800, marginTop: 520, width: '150', opacity: 0, height: '150' },800, function() { $('.otherlayer').hide(); }); }); }); The Call of the Function looks
Listing multiple objects/variables?
Hey, I have a quick question for all you clever clogs :) I was wondering how you would list multiple variables after a equal ==? Example.... if ( pathname == schoolinformation, chaplainchatter) $('#button_newspress_archive,#button_tech_college,#button_parent_portal,#button_transition_portal,#button_6th_form,#button_connect,#button_vacancies,#button_vle_login').css('display', 'none'); $('#school_information_sub').css('display', 'block'); if ( pathname != schoolinformation, chaplainchatter)
When we are return string length more than 60000 from asmx page to js page then “Error in loading” is thrown. Means incase of huge data returning this error is thrown.
Hi, We are using jquery to consume asp.net JSON web services. using jquery 1.2.3 version, IE 8,visual studio 2008 .js page written following code $.ajax({ type: "POST", url: "Services/Services.asmx/_featchData", data: "{'parentForm':'" + parentForm + "','parentRecordId':" + parentRecordId + ",'formName':'" + formName + "','subObjLable':'" + subObjLable + "','userControlID':'" + userControlID + "','currentPage':" + currPage + ",'pageSize':" + pageVal + "}",
Creating elements on the fly
Is there a jQuery equivalent for the traditional: document.createElement('span')Because I'm trying to attach a stylesheet using jQuery. So far all I've found is the add() method, so I've put this together: $(document).ready(function() { $('head').add('link').attr('type', 'text/css', 'href', 'script/fancybox/jquery.fancybox-1.3.1.css', 'media', 'screen'); })But the element will not get added, I presume it's meant to go before the ending '</head>' tag?
Keep Div State after posting page and returning!
Hi All, I have a jQuery script which shows a specified div based on the select chosen from the dropdown list. The problem im having is how to retain the div state after the page has been posted and then returned too, any advice? Many thanks! <script type="text/javascript" src="jquery-1.3.2.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('.box').hide(); $('#dropdown').change(function() { $('.box').hide(); $('#div' + $(this).val().replace('.', '\\.')).show();
trigger a click in a specified position
Hi, I'd like to, for example, trigger a clic at (100px,50px) of the top/left corner of a div. Is it possible? thanks
fading effects not working in this program
I hv a problem.I m trying to apply fading effects to the ul tags but it is not working I m using IE 8.The fadeIn and fadeOut effect is not taking place. However when i write a seperate small program using the <ul> tags , the fadeIn and fadeOut works perfectly. I guess maybe my code is hving some problem so i m attaching the whole folder here.Please note that in place of fadeOut n fadeIn if i use slideDown and slideUp then it works perfectly.That file is also included in this attachment folder.
trigger a click on a specified location
Hi, I'd like to trigger a click, for example, at (100px,50px) of the top/left corner of a div. Is it possible? thanks!
Greybox interfering with other JS?
I've installed the greybox pop up on one of the elements of my page but it seems like it's <script> tags are messing with my previous jquery image slideshow, making it not function at all. Any help would be great, thanks!
Reuse Datepicker formatting for multiple fields
Hi, I want to use the datepicker for multiple fields in a form however I don't know how to have it re-use the settings for multiple fields. For example, I have a form with 4 different fields for dates. I want to use the same datepicker formatting for each field. So instead of having to do something like this $(function() { $('#datepicker1').datepicker({numberOfMonths: 2,showButtonPanel: true, minDate: 0, maxDate: '+10M'}); $('#datepicker2').datepicker({numberOfMonths: 2,showButtonPanel: true,
My script isn't quick enough (hide/reveal/animate/delay issue) - help
Hi guys, Got a page here: http://www.ldexterldesign.co.uk/ My aim is to reveal parts of the page at different intervals. My code works, but I'm getting all elements rendered before my script kicks in? Any tips? http://www.ldexterldesign.co.uk/scripts/js/js.js - code // Hide #footer until wanted $(document).ready(function () { $('#footer').css({ opacity: '0' }); $('#footer').delay(3500).animate({ opacity: '1' }, 2000); }); // Body fadein order $(document).ready(function () { $('#header, #content').css({
IE7 Error: doesn't seem to like insertBefore, jQuery 1.4
I'm pretty new to jQuery so please excuse me if this is answered elsewhere and I didnt find it. My code snippet is here: http://pastie.org/782043 I'm basically rewriting the attr properties and wrapping an image in a table to dynamically add a caption from the alt text. IE7 Error: Line 102, Char 276, Error: unexpected call to method or property access, Code: 0 I looked in the minified version of 1.4 and line 102 is insertBefore. I am using it in relation to a table. Is this a know issue? is there
Expand a from and add more fields
Hey there, i am VERY NEW to javascript and trying to find a way to use jquery to expand my form and add two more fields to it... so im starting out with a NAME and an EMAIL field. this is what i would like: Once you click in the Name and start typing the div with the form will expand and show two MORE fields (Phone and Question) ... i will show you what i have... i am using "prototype" i think to do a light box for now... i think it would flow easier and be nicer to just leave the form there but
superfish menu: third level width problem in firefox and small problem with IE7
Hi all, I'm using the superfish module with a joomla website and have some problems: here is the link: http://en-sof.de/inno/ first, in firefox, the width of the second and third levels isn't adjusted to the length of the longest menu item (in the second level it looks sort of ok, but in the third, half of the word has no background even) I don't know how to change it and to enforce a width that would be ok... I configure it all through the joomla backend, and I tried to play with all the options
Putting document.ready() inline or external?
I have an ASP.NET web-app that consists of a master page and several .aspx pages that use that master page. 1. problem: If I include the jQuery library in the master page at the bottom right before </body> (and after the content placeholder), then in my .aspx pages I am unable to use jQuery because it is included "below" all JS code defined in the pages. Master page: <!DOCTYPE html> <html> <head> ... < ASP.NET head placeholder > ... </head> <body> ... <
Delaying form submission with submit()?
I'm working on a validation class that works on the following idea: 1. when user submits a form, it "pauses" the submission and the validator validates each field via an AJAX call. 2. When each field has been validated, it resumes the submission => sends the form. But I'm having trouble resuming the submission. Here's the part of my code that doesn't work: //Reference to the object var self = this; //Attach the submit-event to the form form.submit(function(){ //This runs when the user submits the
A small problem with Mozzila?
I have a div which when opening a page comes on the page from the right. Everything works fine when the position of that element in CSS is a start animation position.(left:1170px;) But to make possible for those who don't have Java to see the contents of that div, I've written in CSS the right position to which an element has to come (left:150px;). In the first line of jquery code I've then put the same div to the start animation position. $('#gallery').css("left","1170px"); Everything works ok
Problem using animate on menu element
Hello, Here is my current menu : http://wir3d.net/sites/2010-04-Pro/site/_tests/menu_01.htm As you can see, I'm trying to animate each menu element, when the mouse is over. My current code is : $("ul.menu li").mouseenter(function() { $(this).animate({ backgroundColor: '#747472' }, 100) .animate({ backgroundColor: '#84a9de' }, 100) .animate({ backgroundColor: '#747472' }, 100) .animate({ backgroundColor: '#84a9de' }, 100); }) .mouseleave(function() { $("ul.menu li").each(function() { $(this).css({
problem load() event !
Hello, My code : - index.php <script type="text/javascript"> $(document).ready(function() { $("#centre_contenu").hide(); $("#loader").show(); $("#centre_contenu").load("gestion_page.php", function(data) { $("#loader").fadeOut('fast', function() { $("#centre_contenu").fadeIn(1000); }); }); }); </script> <div id="centre"> <span id="loader"><img src="images/loader.gif" border="0" alt="Loading" title="Loading" /> Loading in progress</span> <div id="centre_contenu"></div>
Drag 'n' Drop
Does anyone know of a drag and drop JQuery script or plug-in which works like this: http://tinyurl.com/y9sjnat The video shown is of a Mac development tool called CODA. Just wondering if there's an equivalent online example. Thanks
live and dom traversal functions
Hi all, In the documentation it is written "DOM traversal methods are not fully supported for finding elements to send to .live(). Rather, the .live() method should always be called directly after a selector, as in the example above." Are there any dom traversal methods which are supported with live. If yes then which ? Is there a difference between 1.32 and 1.4 ? Thanks, David
If I want to close an ajax-fetchet div?
When i've loaded the Add_FAQ.php in the div #Add_FAQ... I wont to have a link to close, how do I do that? <a href="#" id="Add_FAQ_Trigger"><font class="Headline">Lägg till fråga</font></a> <script> $(document).ready(function() { $("#Add_FAQ_Trigger").click(function () { $("#Add_FAQ").load("includes/pages/Add_FAQ.php"); }); }); </script> <div id="Add_FAQ"></div>
Insert "&id=1" in $.get("test.php", ?
As the headline says, I want to insert, for example &id=1 in the test.php-URL... $.get("test.php", That works... $.get("test.php&id=1", This don't, do I have to seperate the &-sign o how does it work?
Writing pattern - filling inputs with pattern
Hi - i have this type of problem - i have let's say 4 input[text] fields. And I want that after i click a button and write in the first input, all inputs text change into their original input+ text from input1. Is that possible using jQuery? I found out how to overwrite data, but can't figure out how to simply only add them. I enclose my code. Thank you for any help in advance ;) //-------------------------------------------------- <html> <head> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
JQuery gridview 2nd column's cell value which show/hide the row(s)
<script src="Script/jquery-1.4.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { //To remove the row on click on click of the row $("#check_rows").click(function() { if ($('#check_rows').is(':checked')) { $('#<%=GridView1.UniqueID%> td:nth-child(2):contains(Playing)').css("background-color", "green"); $('#<%=GridView1.UniqueID%> td:nth-child(2):contains(Playing)').css({ "cursor": "hand" }); $('#<%=GridView1.UniqueID%> td:nth-child(2):contains(Playing)').fadeOut(500,
How to disable and REenable a link.
I need to be able to disable a link upon clicking an agreement. Here is what I currently have, I am trying to make a custom button for jcryption. accept : function(checkbox){ if(checkbox.checked){ $("a.trans-30").addClass("submitx").removeClass("trans-30").removeClass("disabled-button").removeAttr("onclick"); $("a.submitx").bind("click", function(){ $('a.submitx').trigger('jCryption'); $("a.submitx").addClass("submitDisabled").removeAttr("onclick").unbind("click").html("<span>"
Animate speed is not working for <ul> tags
Hello, I want to use animate function(changing the top value of UI tag) for the ui tags with a speed of 6000.Well the top value does change for the UI tag but it the animation is not visible meaning that it moves very fast.Instead it waits for 6000 ms and then at the 6th sec it suddenly changes the top value without giving the animation effect. This problem i m having only for UI tag below is the code $('#van-one li a').mouseover( function() { $('#van-one li ul').animate({top:"25px"},6000,"linear");
inline drop down menu
New to jQuery. I'd like to make a menu like the one in the attached mockup. "parent level two" just shows and hides its child links. if, in theory, there was a "parent level three" it would not close "parent level two" when you expand level 3. only the user clicking expands and collapses the sub menus. I want to know where I should begin. what do I need to look into? I really would like to use jquery and be happy and good at it. any amount of help you're willing to offer would be ultra mega appreciated.
question with .load with DIV
when use .load to link DIV to a subpage like this: $('div#test').load('test_1.html');if 'test_1.html' has javascript .load will not load this page's javascript. is there anyway to let me load this page's javascript?
using '.each' method, indexes of multiple lists
I've got multiple divs, each with an ordered list (various lengths). I'm using jquery to add a class to each list item according to its index (for the purpose of columnizing portions of each list). What I have so far ... <script type="text/javascript"> // <![CDATA[ /* Objective: columnize list items from a single ul or ol in a pre-determined number of columns 1. get the index of each list item 2. assign column class according to li's index */ $(document).ready(function() { $('ol li').each(function(index){
Next Page