.click not working for ie7 & 8
I have a dead simple .click() event setup for a div with the id of nextLink. This works perfectly in all the "real" browsers. But I can't even get an alert to fire from IE7 & 8. I have whittled the code down to the simplest it can be to illustrate the problem. $('#nextLink').click(function () { alert("nextLink here"); }); <div id="nextLink">Next</div> I have seen this problem on many a post, but never found an answer to the problem in this basic form. I have tried both .mouseup and mousedown,
How do i make this work?
Hey i have a xml file that is automatically generated when when u run the php script, now after it creates that xml its suppose to parse it using jquery and then display it but for whatever reason it isn't doing so can someone please help me this is URGENT http://mobile.sheridanc.on.ca/~mccrankr/majorassignment/result.html - thats the page that supposed to display the information http://mobile.sheridanc.on.ca/~mccrankr/majorassignment/course1results.xml - thats the xml file, please reply to this
Styling buttonset()
I am using buttonsets on a form. The Themeroller is great for customising the buttons in terms of colour, background and so on but I would like slightly more control over the look of the bottons. Specifically I would like some space between the buttons and I would like all corners on each botton to be rounded. How can I override the default settings to achieve this?
Simple id change won't work.
Hy How do I change a id attribute of a div? I would like to change the id of the nested div from a to b. Here's my html <div id="image_wrap" > <div id="a" style="width:500; height:375;"><ul><li>Funks</li></ul></div> </div> And here's my javascript $("document").ready(function() { $("#image_wrap div").attr("id","b"); });Please help.
Help with active link in Jquery Sliding Panels...Javascript or CSS?
Hi, I'm using jquery Spry Sliding panels for a new site i am working on. I am looking to style it similarly to this example in particular I am trying to find a way to give the navigation links (which will eventually be imgs) an active state (whichever link is currently selected-I wish it to have a different image and same for mouseover) as on the coda website. I'm quite new to javascript, and having read similar articles on the forum have tried different suggestions, but as my mark-up is quite different
AJAX with Firefox it works, with IE or SAFARI not
Hello, I've searched for more than 6 hours, but I can't find the problem. I hate it!!! I've written a code, which should get via AJAX the actual status of my file upload. In Firefox it works fine and the status grow up slowly. In IE for example, nothing happens... do you have any ideas? the first ajax (the get statement) works fine, i think the problem is ihte second one... this is my code (sorry the comments are in german) // Wenn das Dokument geladen ist $(document).ready(function(){
jquery and click function
Hi, i insert many texarea's, and teaxarea's with tiny mce (WYSIWYG). But when i Insert this teaxarea's from this function Tiny MCS don't work. Why? $(document).ready(function(){ $("#InsertNew").click(function() { $('<textarea class = "tinyMCE"></textarea>').appendTo($('#textBody')); }); }); Thanks
Use Sortable for Multiple Columuns?
In my design for admin panel, i wanna drag and drop modules. i have a php array with module names, and i need to save them sql like this; id | name | order | where 1 | module1 | 1 | leftcolumn 2 | module2 | 1 | rightcolumn 3 | module3 | 2 | leftcolumn there is a demo what i do; http://balkoncu.com/demo/ i can list right and left, but when i drag and drop something from one to another, it's not working. is there any way to do that in jquery? can i get the information about where
How to determine if the selector portion of a load() call failed
I'm trying to use load() with a url and a selector, like so: myObject.load('url.html #selector', function(response,status, xhr) { // code here }) I can test for the ajax request to fail, but browsing the source code of jQuery shows that if the selector fails, the entire content of the url.html document is loaded into myObject. In my use case, the browsers just reject inserting the full document and I'm left with no content. After discussing this with a guru here, I can see why this would be
Can't get the right selector for my forms
Hey all. I have a problem that I couldn't solve myself. I have 2 forms. name="form1" and name="form2" In each form, there's the same class names for rows. <tr class="draggable"> What I need to do, is to take the last draggable row in a certain form. $( tr_object + " tr.draggable:last" ) <- returns the last tr with class draggable in whole document. How do I limit It's view/search scope to one of the forms only? Thanks
jQuery IFrame Cross-Domain
Hi, I've been searching google like crazy but did not found any good results. I've got a html file on my computer in which different pages from different domains and I need to access the html on those pages through jQuery and change css or give an allert according to the content greetings!
Getting a table to slide in a div?
Is it possible? I have a div with a table and 4 cells in the table. What I want to do is get the cells to 'slide' from right to left and keep rotating though the div, like an endless carousel.
Trying to perform an Ajax request when a checkbox is checked using listeners -- not working.
When a checkbox is checked I am trying to perform an ajax request: <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript"> if ($('#profile_visible:checked').val() !== null) { $(function() { $.ajax({ url: 'inc/ajax_profile_settings_changeProfileVisible.php', success: function(data) { $('#resultProfileVisible').innerhtml="success"; alert('Load was performed.'); } }); }); } </script> ... ... <p> <input type="checkbox" id="profile_visible"
Jquery and Ajax Dynamic Editing Inline
I would like to know whether there is any jquery or ajax script for the following. (1) It should be able add new rows to a table. (2) By clicking on the column of a row, It should get a text box and text should be able to edit and save to database. (3) Also it should be able to change the background of the column, by selecting the color from the text box coming while editing. (4) I should have drop downs for 2 columns in every row. (5) I should be able to save the changes to database. And should
how to access nested div in jquery?
I have nested stucture of div something like this: <div id="main"> <div class = "container"> - - - - - - - - - - <div id="abc"> - - - - - - - - <div classs="me"> <ul> <li> <a href="../02/1.jpg" class="preview" title="Lake and a mountain"> <img src="../02/1s.jpg" alt="gallery thumbnail" /> </a> </li> </ul> </div> </div>
a problem with submitHandler (form validation plugin)
I was trying to make a simple test of the form validation submitHandler option: $(document).ready(function(){ $("#commentForm").validate({ submitHandler: function(form) { alert("hello world"); return false; } }); }); The alert never happens! is there something wrong with my syntax? Please help!
Problem with SUBMIT and ajax
Hello. I am working on a project. and using ajax to check if its a valid username and password. and if it isn't it shows this stuff and doesn't continue to login the user. but it doesn't seem to do that. it always jsut goes threw and response sometimes isn't set. and my other code to for registration works fine. Let me provide more information. If i put a Username and no password it works fine. if i put a nothing it works If i put no username but a password it works as intended. but if i put
IE8 + jQuery + $.ajax
Hi there. I have a problem with .ajax function and IE8. Short brief: I use jQuery for ajax requests and have trouble with that in IE8 but in other browsers my code works fine. I can say more. Even IE8 works fine but after manual page refresh (f5, ctrl+r). When page loads first time and I click on ajax item I`ve got error "Object expected" or something like that. Now I ask for help. I spent about 3 days on this trouble. Thanks. My sample code: <h1>IE Ajax Test</h1> <a href='javascript:void(0);' id='ajax'>do
A question about one of the options ability
I was working with jquery and wanted to use it to call items from a database as soon as the page loads. I seem to be running into a problem trying to make a specific page appear based on the link selected by the user. The links are drawn up as titles from the database. The problem is the jquery code I am using is just not up to snuff. How do I change the code so it supports exactly what I want or can jquery not do this? My code is below. <?php include('header.php'); require_once('connection3.php');
"partial" multiple selectors
In order to refer to the two inner divs here, <div id="parent"> <div class="class1"></div> <div class="class2"></div> </div> I need to use the following multiple selector syntax: $("#parent .class1, #parent .class2") I was wondering if there is a shorter idiom for operations like the above that doesn't require specifying the entire selector, something along the lines of: $("#parent .class1, .class2") which, if I understand correctly, doesn't mean the same as the former selector.
jQuery animate undefining another function?
I have a function that takes thumbnails and displays a larger version of them inside a div when clicked. Some of these photos have a 16:9 aspect ratio while others have a 3:2. To compensate a wrote a function that adds padding to the top of the widescreen photos in order to have a letterbox feel inside the div they are loaded in. This works fine when I use the .css method to render the padding, but when I try to use .animate to give it a little style, the function that controls the gallery returns
Problem with setting an onsubmit event
I have a page with several different forms. One of these currently has an onsubmit event to run a custom validation program before the action is triggered. This event is currently shown as onsubmit="return validateForm(this)" and works as expected. I want to be able to use this form in some instances without this validation so I want to take this event out and add it if a certain field has been set before the page was loaded. I'm new to jQuery and thought I'd understood how I could do this but I'm
performance problem on img slider on my site
Hi all. http://simonborn.de/slidertest/ Can anybody tell me, why this is getting amazingly slow after running some while?
farbtastic with wordpress help.
hello i am very new to javascript and jquery. i am working on a wordpress theme right now and would like to give users the option to choose there own colours for specified elements of the site (heading tags, backgrounds, etc) i have chosen to use farbtastic as it seems the best and wordpress already includes it. so i have my option page, and have the colour picker working for the first option, and i can retrieve the first option fine. but every colour picker i add after that is still linked to the
drag multiple elements at once simultaneously
Is it possible to drag multiple elements at once? For example, if you have a container with a navbar inside, but aswel a navigation bar somewhere else outside the container: HTML4Strict Code: <div id="navbarone"></div> <div id="container"> <div id="navbartwo"></div> </div> Could you make something for example in JQuery, that drags both navbars simultaneously when dragging one of the two bars? Perhaps with a handler or something... $('#navbarone, #navbartwo').draggable({ "axis": "y" });
Headers and non JS code returned from JSONP request
Im trying to figure out if a public picasaweb userid exists or not. Its a pure client app, so no server-side proxies. The 1st method works only on FF & Chrome. $.ajax( { url: "http://picasaweb.google.com/data/feed/api/user/nonexistentuser?kind=album&alt=json", success: function(data) { alert("success"); if (console) console.log(data); if (data == "") alert("Invalid User"); }, error: function(XMLHttpRequest, textStatus, errorThrown) { alert("error"
How do I pass an ID or variable from hyperlink to target page
I have an unordered list of hyperlinks present in a right sidebar on each page where each list item is a specific topic. For example: Drunk Driving Homicide Rape Molestation Etc. Right now each of these simply hyperlinks to a page that contains a similar list with a few additions and those list items utilize the .load function to draw an external page for each topic into a div located below the list. So, the sidebar list currently just links to 'crime.html' and 'crime.html' has a JQuery .load functionality
How to highlight main menu item ising .css()
I have a main menu, then a series of sub-menus that fade-in when one of the main menu items are clicked. I want to highlight the main menu of the selected sub-menu and have done so using: liID = '#mainmenu' + menuID + " a"; jQuery(liID).css("color","black"); menucategory = menuID; Then when you select another main menu item I wrote this to change it back: liID = '#mainmenu' + menucategory + " a"; jQuery(liID).css("color","#bbb"); It all looks good, except after I've changed the color back to #bbb,
Anyone know a plugin or script to replicate this flash menu?
The menu on the right of the page. http://www.sala.ubc.ca/ Nothing crazy, but want to replicate exactly. Thanks y'all.
download image first, then apply fadeIn
i have this code that works <head> <script type="text/javascript"> $(function () { var img = new Image(); $(img).load(function () { $(this).hide(); $('#divContent').append(this); $(this).fadeIn(); }).attr('src', 'images/main.jpg'); }); </script> </head> <body> <div id="divContent"></div> </body>but this code limits 1 image and the name of the image is placed inside the js function. my question is: can i alter this code or can someone share an idea to write a more generic version so that i can download
Animate scrolltop is not working on its own element
I want to hide a map until it's needed, then when a button is clicked, load the map then scroll to it. Here's my experiment/dev site: http://coventry.vip-news.co.uk/ Here's what I'm using: <div id="themap" class="themap c2"> <br /> <script type="text/javascript"> $("button").click(function () { $("div.c2").fadeIn(1000).delay(1000); load();searchLocations(); $("div.themap").delay(1000).animate({scrollTop:10}, 'slow'); return false; }); </script> I've read lots
How to toggle checkbox when parent element is clicked.
I have an <input type="checkbox"> whose immediate parent is an <a> tag. The <a> is significantly larger than the <input>. I want the checkbox to toggle on/off whether the <a> is clicked or the checkbox itself. I also want to store the value of the checkbox after it changes. This sounds simple but I'm having trouble with the event bubbling (as in, I don't understand it). Here is my current code. HTML: <a href="javascript:void(0)">Some text <input type="checkbox"></a> JS: $('a').click(function()
Unable to select an image loaded via AJAX
I am using the code below to load a resource via AJAX that contains a <ul id="photoCollection"> . That list has an image in each of its <li> tags. This markup and images are getting loaded as expected into the target Div #photoCollectionWrapper. $('#photoCollectionWrapper').load('/photo_collections/1/photos', photosLoaded()); Once the images are loaded into the target div with AJAX I need to select them so I can alter their widths and heights. So far, I have been unable to select them as expected
Force image to reload (without appending a timestamp/random number to URL)
Hello all, I'd like to revisit the question of reloading images, as I have a situation that requires a different approach than what seems to be the most common method. Typically, one adds a unique string as an additional parameter to the URL, thus making it a unique request and forcing the browser to retrieve a new result from the server. However, this prevents the possibility for the server to return a 304 'not modified' response to the browser. In my case, I need this capability for performance
How to add this element in runtime ?
Hello, I need a small help to catch an element and add another element in run-time using jQuery. The HTML looks like this - <td class="fieldCell"><input class="inputbox" id="password" type="password"><span class="cbFieldIcons">lots of HTML codes</span>....</td> I want to add some more element in .... place. That is, just after the <span class="cbFieldIcons"> ends. Please note that there is actually no .... in actual code. I personally wrote a code using jQuery, but some reason, it is not working
What document is this?!
Guys & Gals, need some help. I have a shared .js that sometimes needs to do different things based upon which doc.html is currently running. I need a selector or something that tells me what the doc in doc.html currently is. Something similar to document.location but not the full url, just the html document name... (as a string?) If you know what the selector for this is (or whatever will tell me) - thanks!
Help with filtering content!
I am attempting to filter content using multiple class names, but I can't seem to be able to get the content to be filtered based on their class names. Here's the code I have so far: $(document).ready(function(){ $('#sorter a').click(function(e){ var sortName = $(this).text().toLowerCase().replace(' ','-'); if(sortName === 'all-images') { $('#photorow1 li').show().removeClass('hidden'); } else { $('#photorow1 li').filter(sortName).show().removeClass('hidden')
[jQuery] JQuery Plugin: SpinBox / SpinButton Control (with no extra markup)
Hi everyone, I've been working on a Spin Control that uses only a standard textbox. <input type="text" /> With Javascript enabled the textbox looks and acts like a spin-button control without adding any extra elements. http://www.softwareunity.com/sandbox/jqueryspinbtn/ The up/down arrows are achieved using a background image, the rest is handled by Javascript/JQuery. I hope it is useful for some of you. I'm also working on a drop down date-picker that uses similar principles. (I just don't like
Call AJAX file twice
I'm calling a file using AJAX twice in a webpage. Once when the page loads and then again when a button is clicked. Both calls would execute different functions, but would be using the same file to do so. The first time the AJAX call works, but then when the button is clicked it doesn't. I'm not sure if I can have more than one AJAX call to the same file in the same page, or maybe my code needs to be modified a bit, but I listed it below. Thanks in advance. Zeeshan Syed $(function(){ $.ajax({
JQuery manipulation is not happening
jQuery('div#primary').attr('width', '300'); I am manipulating html file. I am doing the above. But It is not updating the html file with the new width. Can you please let me know, what might be the error?
Next Page