i had to include the script for this div in the request because when i don't do that the script does not apply on the div.is there a way to make it apply without the need to refresh it ?in other words how to make scripts apply on newly updated content. because i noticed they don't
I'm trying to get width() and height of $("#slideshow_container img") which is what is loaded from 'content/slideshow' however it seems that the img are not loaded in time for thecompletefunction run, however the html etc is. I need to just add$("#slideshow_container img").center() but every time i do it the width and hieght of the img are 0 but the img elements are in fact there
I'm using a function to display a table of data on a page (from an array that'll be linked), and using jquery to alternate the background-color of the rows. Readers will then have the option to search the data (not important here) and then to reload the original data. But when the original showAll() function is called from a click event, jQuery doesn't apply the background colors at all. How to 're-awaken' jQuery the second time the showAll() function gets called.
I want to apply an attribute only to the li tags which do not contain a UL, and I'm having a hard time writing the statement. It should look something like this:
I am using jQuery to dynamically style my pages. For example, I prepend icons to certain headings or make links with certain id's perform AJAX operations. I am performing or binding all of this in the document.ready function.
Sometimes I am opening a popup window which basically displays another page. Now, I also want to apply my styling function to the new elements within the popup. What is the best way of doing this? Sure, I could just call all the styling functions for the whole document again after opening the popup, but is there "cleaner" way?
If you try out the code, you will see 2 buttons. Either button downloads content into the page using ".Load". You can try clicking on either or both buttons. The problem is that I want the color of loaded content to match the color of the button. To do this, I set the css of the loaded content to be that color. This works very briefly, and then its covered up again by the default color, which is black. It is as if the browser loads content, applied my css from my css code, and then makes another pass and applies the default css. But of course Idon't know for surewhat the browser is doing. So there are 3 web pages here. The first is the webpage that has the code. The other two are webpages have the paragraphs that he first page loads. The names of the pages are listed: So voila - first page (name is demoProblem.htm).
<!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" xml:lang="en" lang="en"><head><meta http-equiv="Content-type" content="text/html; charset=windows-1252" /> <title>Course page</title>
I have several images as thumbnails on my page and applied the 'changeImg()' function the onmouseover event. It then shows the thumbnail image as 'big' image at a certain position. It looks kind of boaring and it would be nice to apply jquery to have a nice effect problem: after quite some time I still don't seem to be able to integrate it into the existing javascript function.
I am having trouble figuring out how to correct this error, i think i have narrowed it down to what function is causing the issue, since once i comment it out, it doent give the error, but the code no longer does what its supposted to. Whats weird is that the code works how it should even with the error, but i dont want any errors even if they arnet effecting anything... well here is the code:
I'm writing a little application with JSF 2.0 + jQuery. My page contains a simple input form, a submit button and a div containing one div for each string that the user type in the input text field. i'm using JSF 2.0 ajax to send the request to the server and rerendering only the div-container, with the updated content. Initially the div contains a single div with a text example for the user. Every div inserted by the user has the style-class "user", so with jquery I manipulate all off them through a simple function.
Here my code:
But i've encountered this problem when I started using ajax: my jquery function doesn't work on the new content, so I started trying to resolve the problem with live() method as suggested in the FAQ and on several posts
So my code changed a little:
This code doesn't work at all after the submit event, so for test purpose only i've changed the event to click and ,using the event generated from the mouse click, it's working.
But obviously i need to apply my jquery function right after the ajax request and without the user's partecipation.
I'm testing this code on Firefox 3.6.13, but i need it to work correctly also on IE8, Chrome 8 and Opera 10
What's wrong in my code?I have bound the wrong event to the div-container and instead I have to bind the submit-event to the form?
I'm fairly new to jquery and slowly picking it up as I go. Here is a problem I though would be simple-ish but I am stuck. I think I have most of what I need, I just need the correct way of writing 1 part of it.
I have 2 div with the same id, and i call a function onmouseenter. It works very well across all browsers except IE7 where the first div work but the second one does not run the function.
I am using an jquery accordian as a menu in my site...it goes on next page when i click on the button but i want to show an that button in active state when it on is on its respective page.
Below mentioned code is i am using for my accordion menu.
For example, I am using ajax and a bunch of code to generate a list that is dynamically generated. This part is working perfectly, however I can't seem to remove any items from said list (since they didn't exist when document.ready fired). How would I go about having a function that could remove items from my list?(tried declaring something like hideItem(){ $(this).parent('li').hide(); } and calling it in the onclick event of the removal link, but it says the function doesn't exist.
I'm currently working on a project in wich I use a pair of trees. The thing is that one of them is too big and IE6 (it needs to be supported :s ) takes forever to process the tree so I want to load it asynchronously branch by branch using the async version of the tree. The problem is that I want the tree to be a filetree, but when created as async it displays with default style. Is it possible to create an async filetree (without applying the classes "manually")??
I'm trying to update a plugin i downloaded. What i'm trying to do, is make it able to work with dinamically created objects. I'm using the live function to assing javascript events, but i need to know how to assing a plugin dynamically. This is what i have right now:
$("#txtinstruments").AutoComplete("query"); What this does is apply the AutoComplete plugin, to all the objects with id txtInstruments that are already created but, i create more objects with that id on the fly, and i need to assign the plugin to them.
well i am using quicksand, i want to use tool tips in it, but i am facing problem due to callback code that i am not able to implement, this is the place where quicksand is present and also told about tooltips usage with it, well he has not explained it in detail as expects people to know jquery before using it the code which is saying to use is this
I am using the JQuery validation plug in for form validations. My page contains a loop in which dynamic forms are generated and within each form some text fields are also dynamically generated. I have assigned the id and name attributes both to form and fields with dynamically appending a value. Now I want to apply the validation on all these form, please note that each form contains its own submit button. I have tried using the following selector,