Is there an Event that triggers after CSS loaded?
Hi. First time poster here, wondering if anyone can help me with this interesting little problem I have. I have a couple of links on my page (inside a <div id="theme-selector">) which allow you to change the CSS stylesheets: $('#theme-selector a').click(function(){ var csslink = $(this).attr('href'); $('head link').remove(); $('head').append('<link type="text/css" href="'+ csslink +'" rel="stylesheet" />'); return false; });Now, after I've changed the style on the page, I want to
How can i display a page while still loading with load()?
Hello, ive got a slight problem. I'm trying to load a php file with load() to write entries to a mysql database. I want to keep track of the progress and update a progress bar while the entries are being written. The problem is that all the javascript code inside the php file im loading wont be executed until the file is completely loaded (after all the entries have been written to the db). Is there a way to change the load() function to display the content while its loading and not wait until its
Objects
Hi everybody; I read arround that to retrieve a DOM object from a jQuery Object, I need to use the $.get(i) function, where the i is the index of the obect to retrieve; but. The question is that I created an UL with LIs on the fly, something like: var list = $("<ul>").css("margin", "0px").css("padding", "5px"); And then added some Li's on the fly inside a loop, something like this: $("<li>").text(message).appendTo(list); And now I want to pass the UL to a function that will display the UL as a kind
binding jQuery to elements after a page load?
Hi all, I've recently started programming and came across jQuery. Searching the web for how-to's has tought me quite a bit, but i also see that most scripts start with the command to wait for the page to load before doing anything else. For my pet project i am getting output from a live database search into a div container. However, i can not get jQuery to bind functions to the elements on the page that is loaded dynamically. With bind functions i mean something like: $("div[id=moreinfo]").hide();
Superfish undo alphabetical order
Hello, I am using the superfish plugin that is already installed in a theme. I would like to know how you can undo the alphabetical order of the categories. I would like to select my own order if possible. Is this easy to do? Is there anybody who can explain how to do it? Thanks in advance.
Ajax call doesnt return anything
Hi, The below code works in IE & Safari but not in Firefox and Chrome. Dont know why. Can you pls help. <HTML> <HEAD> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript"> $.ajax({ type: 'GET', url: "http://yse-uk.com/hijridate/hijridate.php", dataType: "html", success: function(msg) { alert(msg); } }); </script>
Using a function with ajax and variables.
Hello guys, Im trying to do the following thing, I have a function in javascript which I want to use to call an AJAX event, during this event the variable that is set in the function needs to be passed to the file called by the AJAX event. Basically I create 2 different versions of the same stuff inside the AJAX called files using the variables. But im running into some cross browser related issues, this all works fine in FireFox. However in Internet Explorer it sometimes works but gives javascript
Accesing an input element by its value
In a project repeated blocks are identified by an <input type="hidden" value="x" /> field. To get an access to one of the block I wanted first access to that field. My first problem is there and I will explain it by a micro-project (tested with Firefox only) Here is the HTML code : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf8" /> <meta
Advice for traversal scenario
I'm wondering if anyone has advice for how to locate prev and next '.trigger' items in a UL like this: <ul> <li><a href="#slide1" class="trigger">Slide 1</a></li> <li><a href="#slide2" class="trigger">Slide 2</a></li> <li><a href="#slide3">Slide 3</a></li> <li><a href="#slide4" class="trigger current">Slide 4</a></li> <li><a href="#slide5" class="trigger">Slide 5</a></li> <li><a href="#slide6" class="trigger">Slide 6</a></li> </ul> <a href="#" class="prev">Prev</a> <a href="#" class="next">Next</a>
Counting number of <img> in a <div>
I've been fiddling with the .length function but can't get it to return anything other than the number of <img> in the document. Any push in the right direction would be greatly appreciated.
Simple Image cross-fade using navigation
Hi there, I'm working on a simple mouseover function to swap div/image fade IN and OUT and I'm getting this white flicker in between. It seems like the fadeIn waits for the fadeOut to start, hence the flicker. I've searched and found solutions, but can't implement them correctly as I am more of a beginner with JS and jQuery. Here my code: $('#protect').mouseover( function() { $('#pgrc-protect').fadeIn(100); $('#pgrc-land').fadeOut(100); }) I'd like to have the fadeIn
Homepage Centerpiece
Can anyone point me to a tutorial that explains how I can build a homepage centerpiece similar to this one? http://www.bigspaceship.com/ Thanks In Advance for your help!!!
slideDown issue
Hey everyone, I just started using jquery and im havnig trouble using the slideDown effect.. i tried creating a navigation bar using the slide effects, but for some reason the slide effect isn't working smooth, after it partially slides the div it just stops and reveals the rest of the div without the sliding effect.. its like it has some wrong height setting or something idk.. if you guys can help me a little here it would be great thanks in advance..
Using fadeOut method
Hi This works fine on a normal button but not on one that runs at server i.e <asp:Button ID="btn1" runat="server" <script type="text/javascript"> $(function() { $("#btn1").hover(function(){ $("#location").fadeOut("normal"); }); }); </script> How can I make it work? thanks D
a href NOT working with jQuery...?
Hello, I'm having an odd problem that I'm not sure why it is happening. I have a image reel that scrolls from left to right 100% width of the page. Each picture is suppose to have different URL's the direct to the correct webpages... but that is not happening. What seems to happen is that the first <a href="http://www.img1.com/"> gets applied to ALL of the images... why is this happening? I don't see anything wrong with my HTML or CSS and is valid. Here is the website I'm working on: http://www.joblesspunkdesigns.com/
String concatenation help required please...
I am totally confused at how to fix this... i want to output the value of 'this._hte' but instead it gets attached as a string literal.. jQuery(this).attr('href','\"<portlet:renderURL><portlet:param name=\"cmain\" value=\"+this._hte+\"></portlet:param> </portlet:renderURL>\"'); How can i concat the value of 'this._hte' with the rest of string?? Sulman.
Trouble with .live()
I'm having trouble with the .live() function. Here's the code I'm working with: $(document).ready(pageLoaderInit); function GetUrl(event){ if(this.href.indexOf(home)>=0&&this.href.indexOf('/wp-')<0){ event.preventDefault(); document.getElementById('blogcontent').innerHTML='<center><img src="'+loadingIMG.src+'" /></center>'; var contentclass = document.getElementById('blogcontent').className; $("#blogcontent").load(this.href + ' .'+contentclass+''), function(data) {}; } } function
problem in using two plugins simultaneously!
Hi there! In my page, i tried to use lightbox and jquery "easy news". the problem is when i copy the external file links within <head>, one plugin is not working properly. What is the problem with the ordering of external scripts?
how to properly use .stop() ???
Hello! On this page: http://www.arvag.net/old/smsbox.de/ when you hover over "Informationen" and "Über uns" you get sub menu shown. When you move mouse away it hides. Normally i have problem with jquery making queue for every single hover i make, and then i just keeps on animating all those hovers. I tried to implement stop() but just cant get it to work properly. This is the code i am using: <script type="text/javascript"> //<![CDATA[ $(function(){ $('#nav_menu >
How to get :contains to work with multiple criteria?
I've got the following selector. $("#event_log tbody tr :nth-child(1):not(:contains(System))").next().editable( '$events_src', { I want to add additional text items Alert and Adjust to the criteria... like this, so it would select if not System or not Alert or not Adjust. $("#event_log tbody tr :nth-child(1):not(:contains(System,Alert,Adjust))").next().editable( '$events_src', { But it's not working. Is it not possible to have multiple criteria in the :contains selector?
jQuery and PhpList
Hey guys, Just wondered if anyone here had used jQuery to validate their phplist subscribe forms?
Hidden div png issue in IE6
I have use pngfix for ie 6, but that code is not working with Hidden div any buddy can tell me why this happen? any solution in jquery.
PNG issue with IE6
Can we solve ie6 png issue using jquery..?
Problemas para validar input file class multi
Hola Tengo el siguiente problema, en el sitio que estoy desarrollando tengo un formulario que tiene campos de texto y campos input file para subir imágenes al servidor. Utilizo jquery para seleccionar multiples archivo y funciona ok, incluso controla si el archivo está duplicado y demas. Pero el problema que tengo es que no se como validar que por lo menos haya seleccionado un archivo, pues el formulario no puede ser enviado al servidor sin una imágen relacionada con el resto de la información. El
Accordian Active Animation Not the right width
I was wandering if anybody new how to fix this issue with the accordian I do not know were to go to resize the slide up and down animation. It is not the width as the header when in motion. how can I fix this. exampe: www.eduvizon.com look at the right side accordian menue and click on the blue box to make it slide. when it slides it has a nasty over sized gap on the right side how can I fix this.
Make accordian menu stays expanded after click. Is it possible?
I implemented the menu good for now, but I have problem that when I click the link in the menu, after the page loads the menu returns to the start position (it collapses). Is it possible to make the sub-menu active so it stays expanded according to what page you see? Best regards, Gorast
Jquery and mysql (refresh)
Hi guys, i would like to check every 5 seconds whether a change in my database has been or not. Now i have the following code: <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript" src="jquery.fade.js"></script> <script> $(document).ready(function() { $("#mydiv").load("index1.php").css("background-color","white"); var refreshId = setInterval(function() { $("#mydiv").load('index1.php').vkfade('ff0000','600');
Does anyone know the most efficient way to filter a list with another list
Hi, This is my first post and am new to jquery. I am trying to work out the best way to filter a list with another list. The idea being when you click on one or multiple items of the filter options jquery will hide all of the items in the results list except those that contain a class with the same name as the text of the selected items from the filter list. I think I am in the right position with my html to start applying some jquery My filter lists look like: <div id="menuList">
Accessing an element within JSON retrieved data
Hi guys, When retrieving JSON data I'm able to access individual elements using the $.each() function and iterate over them. However, how would I access just one element by its location and not by name? (i.e. data(0) not data.ID). Many thanks
jquery with body onblur function
Hello, i am using jquery. There is function at my content of page sucn as <body onblur="pencereKapat();"> i am tying to evulate same function with jquery. i tried $(document).blur( function (){ pencereKapat(); }); it works with firefox but doesnt work with internet explorer. I tried different form. but none of them works $('body').blur( function (){ pencereKapat(); }); $(document.body).blur( function (){ pencereKapat(); }); $('body').bind('blur',function (){ pencereKapat();
Parsing Nested Repeating XML using JQuery
Hi there, I have an xml with nested repeating entries. I want to parse it using jquery, I have tried .find method but it ignores the child parent relation and consider all as child nodes I want to parse it in hierarchy like first it should show top level categories then if have nested categories and then if have products and so on. Please guide me how could i do this? <products> <category> <categoryid>2</categoryid> <categoryname>Lunch</categoryname> <category> <categoryid>5</categoryid>
AJAX: Click link to fire off a PHP request and then update two DIV's
I'm fairly new to jQuery and I'm definitely a beginner (there's my warning!), but I'm sure that what I'm trying to achieve is a walk in the park for the experienced lot on here. Basically I'm building a website (with several hundred products) that has a 'Shortlist' feature (think of it as a Shopping Cart if you like). Whenever a product is display on the website, there is an option to 'Add to Shortlist'. The backbone of this is a simple PHP script that is working perfectly; however I want to make
Namespaces in XML OK in Firefox, not IE or Safari?
I'm using jQuery 1.4.2 and attempting to parse an RSS XML file via AJAX. In Firefox, using "media\\:thumbnail" works fine to get an element with a namespace. This fails in IE 8, Safari for Windows and Safari for Mac and iPhone. Getting other elements without a namespace works fine in all browsers. I've searched the documentation and forums, and can't see that I am doing anything wrong. Here is a code snippet: // Define the RSS feeds to load for thumbnail images var rssFeeds = new Array("photo/Favorites_2008/photos.rss",
jQuery menu generator
Hi All, I'm working on a new online jQuery menu generator. I would love to get some feedback on this! http://skingenerator.com/ Thanks in advance!
Check All and UnCheck pass values to hidden form.?
<input type="checkbox" name="checkGroup" id="all"> <input type="checkbox" name="checkGroup" id="one" value="1"> <input type="checkbox" name="checkGroup" id="two" value="2"> <input type="checkbox" name="checkGroup" id="three" value="3"> <input type="hidden" name="storeCheck" value=""> $(function(){ $("#all").click(function(){ $("input:checkbox[name='checkGroup']").attr("checked",$(this).attr("checked")); //Need to pass array[1,2,3] to the value of storeCheck? }); $("input:checkbox[name='checkGroup']:not('#all')").click
Selection of 'data' returned from ajax function
When I use the ajax function to grab the remote content of some page, I would like to then apply jQuery selectors to that data. Does anyone know how this can be done? Let's say that I just grabbed the content from an html page. I would then like to be able to use a standard: $("#someID").val() to get the content of that page element.
Loading remote content - partial page
I can use the jQuery ajax function to grab all of the html from a remote page, and that's cool. What I would like to do is to grab only a particular element of the remote page, not the entire page. Is this possible? I've tried some variations of the ajax 'url' param, but I haven't gotten anything to work yet.
webkit position() of offset() returning 0 when bound to click on image map "area"
So, it seems to work as expected in FF, but not Chrome, Safari or IE. I have an old site with image maps throughout the pages and whenever I try to get the position of the map you clicked on, it returns as 0 in any webkit browser. Just something simple like this: $('area').bind("click",function(){ alert($(this).position().left); // returns 0, but returns actual value in FF }); If I use something like: var xpos = $(this).parent().offset().left; var ypos = $(this).parent().offset().top; That gets me
How to select table row based upon the contents of the first td?
Hate to trouble you gurus with such a simple question but I'm just beginning w/jquery etc. Anyway i've come up with the following but it doesn't work. $("#table_id td").not(".Source:contains('System')").parent().addClass('edit_allowed'); The first column has class "Source" and I want to add the class name "edit_allowed" if the contents of teh first td is "System". Thanks in advance.
Using tabs and validate
I am a relative new user to jQuery so be gentle with me I am trying to combine the tabs plugin with the validate plugin. What I have is a page with 3 tabs. The first tab contains registration information that I need the user to complete before he/she moves on to tabs 2 and 3. Now I am using the validation plugin to validate the information on tab 1 and this is working out great. However my problem is that the user can still click on tab 2 or tab 3 before the information on tab 1 is complete. So
Next Page