Google Analytics together with jQuery leads to 2 creations of __utm.gif
Hi, I implemented the asynchronous analytics snipped together with jQuery and get two created versions of __utm.gif. When I remove jQuery there's just one left. Does anyone know why this happens? Here's my code: <!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="de" lang="de"> <head> <script type="text/javascript" src="http://static.golocal-sol.local/js/jquery-latest.js" charset="utf-8"></script>
Help with looping through multiple slideshows and looping through one slideshow when hovering
Hi, Firstly, I am a newbie to this forum and jquery, so I apologise if this is not the correct forum to ask my question. I am currently developing a website where the client wants the following: 1. Transition through 9 images when nothing is happening 2. Transition among 3 images when hovering over a specific area of the screen. I've created 3 divs and created a slideshow for each, this allows me to only display a slideshow when hovering over a button. I've managed to get the hovering image effect
Can't stop bubbling.
Hello all. I cannot work out why this doesn't work. $(document).ready( function(){ // Actual jQuery goodness that moves the captions // Set the default value for the caption $('.boxcaption').live('click', function(){ console.log(this); } ); } ); When I run the following and click on a .boxcaption element. It returns the this value 15 times, once for each .boxcaption that is on the page. I only want to return one value, which is the one I have clicked on. What am I doing
Advice for a fading div solution for 20-30 divs
I'm currently developing a site where I host my music and I have about 80 tracks that I've released. My current approach is to have a pagination at the top and below the pagination there are 5 tracks listed at the time using ajax request that returns a table with 5 tracks at a time. Each track has a little 70x70 image, two JQuery UI buttons (play and download), some text and a third party "AddThis" script to present a facebook "like"-button. I don't like my current solution due to two reasons:
Click link to create a MySQL data entry
Hello, I have a PHP class I'm using to create a bookings calendar. It outputs 12 months at a time starting with the current month. Each day of each month is a hyperlink. I would like to use jQuery to allow users to click a day to mark it as "booked". I am familiar with passing data betwen PHP pages for processing and storage in a MySQL database but these standard forms would need far too much page reloading to be practical. Is there a way I can pass the property ID and the date the user clicks on
.stop() jumps to end
Hey. I have problem with stopping an animation. When I stop the animation, it jumps to end, even if I have given "false"-attribute. Example: I click hardware. It starts to move to hardware. I click projects. It jumps instantly to hardware. It starts to move to projects. It stops at projects. What it should do: I click hardware. It starts to move to hardware I click projects. It changes course to projects. It stops at projects. http://laasonen.net/ <- My page http://laasonen.net/js/page.js <- goTo-function
Doing a user "Click" or "Select" on a ListBox by INDEX
Hi. I want jQuery to effectively 'click' a specific <option> inside a <select> but to do so based on the <option>'s INDEX in th <select> rather than it's value or text. I am using a <select> that's a ListBox as opposd to a DropDown (if that matters). Ideally, I'm hoping that it will really behave like a "click" in that if the item being selected is below the scroll, it will scroll it into view, but that's just a "nice to have." Help much appreciated!
problem tih 'offset(coords)' in different browsers
I have a very specific bug, and i spent a few hours trying to dig into something.so here's the bug: i have a very different behavior of setting offset top with $.fn.offset function in google chrome and mozilla firefox(ie has behavior like mozilla). the results are very different. as i watched - the inside body of the function gets the top property of element by curCSS, which is definitily giving different results(first case - about 150, other - about 4500 px). i am setting the top of the element
howto catch a value change event on input field?
input field value is changed by a js function i can't modify so i can't trigger() an event from that function. i've tried $(element).change() but it doesn't seem to be working. any ideas?
sum of array works with 1 array not another
Hello all, Once again I call on the gurus after banging my head against the wall for a few hours. I use .clone to clone some elements then I get the various values in an array. All that works fine. However, I want to total up the array so I can validate the total against another value. In the code below if I put the x array in the sum such as sum(x) and alert(quantityTotal) it shows 4 as expected. If I simply alert(quantities) I get 3,1 however, if I sum(quantities) and alert(quantityTotal) I
ajax get an div outside a form
Hello, We encounter a strange issue. Having a html response like this: <html> <body> <div id="mydiv">content</div> </body> </html> Doing : alert($('#mydiv').text());gives me "content" Doing : $.get([url-to-the-page]), {}, function(data) { alert(data); //shows all the html (see above) alert($(data).find('#mydiv')); // SHOWS NOTHING !!! } );To get the correct result ("content"), i have to put the div into a form : <html> <body>
This works...kinda
I am using jquery for a user registration form that sends the the info to a PHP script to check for duplicate username's on signup. Even when there is no entry found and the script preforms the update statement, the error will come back indicating the requested name already exists. if (isset($_POST['name'])) { #Check to see if requested name already exists $name = $_POST['name']; $siteid = $_POST['siteid']; $checkname = mysql_query("SELECT * FROM projects WHERE url = '$name'"); $founduser = mysql_num_rows($checkname);
div return value to parent
I have a form, and in that form I have a div that list a table of pet owners. This table is loaded from a file called findowner.php. After clicking on the row of a pet owner I want to use the variable I got $(this).attr('rowid'). This is the owners id. In the php file I get it like this: Code: Other td elements here for name, address, etc. '<td>'.'<a id="tableid" href="#" rowid='.$rowid.' >'.$rowid.'</a>'.'</td>'. Code: $('a#tableid').click(function() { var vpetowner = $(this).attr('rowid'); alert(vpetowner);
manipulating Flash objects in IE8
Hello, I'm trying to use jQuery to process embedded Youtube videos in a blog template. The idea is that someone posting a blog can simply paste in the auto-generated embed code, then when the page is viewed the script makes the neccessary tweaks. I've come up with the following code, which works in Firefox, Chrome and Safari: $(document).ready(function(){ // fix embedded videos $("object").each(function(index){ //set wmode $(this).children("param[name='wmode']").remove();
delegate() issue
I had a issue with live() with change event in IE ,that is drop down do not invoke the function on change ,to solve this issue i used delegate().it was working fine with both IE and mozilla.now the another problem i am facing is when i add multiple drop down for the purpose of search criteria(in all drop down contents are same and all are loaded from the same config file) the delegate function not invoking the function.but drop down has different id and same class name.any one knows alternative solution
Select items with one class, but not second class
Hi, <input type="text" class="class1"> <input type="text" class="class3"> <input type="text" class="class2"> <input type="text" class="class2 class1"> <input type="text" class="class1 class3"> <input type="text" class="class1">Given the above, how would I select those that HAVE class1, but NOT class2, don't care about class3 So what I want are the items on lines 1,5 & 6 How could the below be modified to achieve what I want, or do I need something completely different? $("input:text.class1")Cheers,
Replace JS and reload flash with jquery?
Hi! I am forced to use a traditional flash player for my client's project. Since flash is outdated (not supported by Apple iOs) I am not into flash and used the LongTail Player. The problem is the website designer told me to use a gallery with roll over. So I roll with the mouse over thumbnails (<a>) and the video box source is replaced. Code of the box looks like this: <div id="mediaspace">This text will be replaced</div> <script type="text/javascript"> var so = new SWFObject("videoplayer.swf","mp4","384","288","9");
clone(true) launches error
Hi, I'm stuck into a curious problem. I have a function linked to a click event in an HTML button. Inside this function, another method is called, which uses an array with a prototype method for removing elements from an array (Array Remove - By John Resig (MIT Licensed)). When I make a clone(true) of the HTML section where the button is contained, I get following error in FF 3.6.12: "this.slice is not a function". In Chrome 7 I get: "Uncaught TypeError: Object #<an HTMLDivElement> has no method
JQuery Menu Not Working in IE8
Anyone know why my jQuery IE8 menu isn't working? Works in FF: HTML: <html> <head> <link href="stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css" /> <link href="stylesheets/print.css" media="print" rel="stylesheet" type="text/css" /> <script langugage="javascript" src="javascripts/jquery.js"></script> <script langugage="javascript" src="javascripts/page.js"></script> </head> <body> <div id="menu"> <ul> <li><a
How to achieve this effect in jquery (fadein a div on pageload)
Hi, Here is a perfect example of what I'm after: if you were to choose from any of the select menus, when the page is loading you'll see you get a fade effect indicating something is going on. http://www.carsrus.ns.ca/used-inventory/index.htm?reset=InventoryListing Can someone throw me a bone how I may be able to do the same thing? Many thanks.
Reordering jquery group
Is there a best way to reorder a jquery group/array, eg bring one item to the first position? Should you do it with a normal array.sort() or splice(), or is it possible with an internal function map()?
Optimisation by grouping/buffering DOM touching
I was interested by Paul Irish's presentation on best practices where he mentions building document fragments off-DOM: http://www.slideshare.net/paul.irish/perfcompression (page 8) I was wondering about the possibility of having some kind of buffering capability in jQuery, eg: var $buffer = $.buffer(); $bigGroupOfFrags.each(function(){ $buffer.add( $('body').append(this) ); // any DOM touches get buffered }); $.buffer().flush(); // write to DOM I know you can manage this manually as Paul states
Pagination with data tables
This page works except for one thing. With the pages in the footer. I don't want them to go to a different link I just want it to display that pages data in the table not have to have the page refresh, go to a different link. Anyone see a problem with me wanting to do something like that or how would that be accomplished. I'm a beginner at jquery. <?php // Include the database page include ('../inc/dbconfig.php'); // Number of records to show per page $display = 4; if (isset($_GET['p']) && is_numeric($_GET['p']))
Please help me tweak my code! (Trying to dynamically add <a> tag)
I am creating breadcrumbs using XML with the following code: // <![CDATA[ var root = null; $(document).ready( function(){ $.get( "/_assets/xml/sitemap.xml", function( data ) { root = data; var pathname = window.location.pathname; var local_url = "*[url=" + pathname + "]"; var currpage = $(root).find(local_url).attr("name"); var parentEls = $(root).find(local_url).parents(); var mapped = $(parentEls).map(function
display text with angle
Hi, i am new to jquery, I need to display text with 45(or 50) angle. Is exist some plugin for jquery? Or how can i made it? Thx lot
FadeIn being biased? Image won't appear when it is in a sub folder.
I'm not to sure if this is a bug or not, but for some reason the jquery setup I am using does not load images when you have the images placed in a sub folder. The setup is a simple content switcher, and it is a combination of fadeOut, .load and fadeIn. Here is my prototype. http://ray.eltania.net/TEST/AjaxFadeInOut/index.html If you click on Refresh01, it will load and fadeIn the page, which says "TEST01 TEST01.........." great! But an image should have been displayed too. The page is http://ray.eltania.net/TEST/AjaxFadeInOut/Content/test01.html
set interval & .load work in all but ie
My code works on the initial load of ie. Which means .load does load the two files. However, it only does it once, in set interval it doesn't refresh the div with the updated content from the file. It works in every other browser except ie. Any thoughts? Thanks, var notify = window.setInterval(function() { $("#notify").load('test.html').fadeIn("slow"); } , 1000); ; //usersonline ajax request var oncampus = window.setInterval(function() { $('.users_online').load('oncampus.php'); }, 1000);
Getting <title> tag from HTML page using $.ajax()
I have a URL (var spUrl) and I am trying to get the <title> of the page at that location. I am using $.ajax() to pull the page and process the <title> tag from the response $(data). For some reason, Opera is able pull the title from the <title> tag, but no other browsers are able to do so. When I modify the code to pull the <h2> tag instead of the <title> tag, it works in all browsers. Here is an abbreviated version of the code: $.ajax({ url: spUrl, async: true, success: function(data) { var
FadeIn and FadeOut (ROW TABLE)
Hello! I have two tables, one father y the son. When I select a father`s line I want it to show me all its children. right now what i'm doing is through TR display' way, hide and show. I would like to do it with the FaceOut and the FaceIn of the Jquery. The problem is that only the FaceIn and FaceOut of the last line works. Am I doing something wrong? function ShowHideTableRow(rowSelector, show, callback) { var childCellsSelector = $(rowSelector).children("td"); var ubound = childCellsSelector.length
Second Pop Up Video Issues
I am attempting to have 2 locations on a site where a pop up video will display. The first video pops up fine, but the second video window pops up, but does not load the flash player (utilizing flowplayer swf). Here is the code from the site: <ul> <li><a href="#video" class="popup">Pool Paradise</a> </li> <li><a href="#art" class="popup">Art Comes To Life</a><br />3D Version</li> </ul> <div style="display:none"> <div id="video" style="width:425; height:344px;"> <!--<object width="425"
Using $(document).ready within ajax loaded page
I am using jQuery in a strange environment where my page is dynamically loaded via ajax, the problem is the html content and javascript content are loaded separately. I have gotten around some of this by using .live for the events I have used so far but I am now trying to run javascript after the page has completed loading. I am trying to get the jQueryui tabs working among other things. I have tried using .ready and .live('ready', on a div that is loaded but neither works. The .ready seems to trigger
Can't get Datepicker working in ASP.NET content page
Hello! Newbie to JQuery Datepicker here. I'm trying to use it in an ASP.NET C# form content page with no luck. I've even tried moving the scripts to the Master page, even though I'd prefer to just use it on a few content pages. Below is my code. Could someone please show me what code changes I need to make to get this working? <%@ Page Language="C#" AutoEventWireup="true" CodeFile="speaker_request_form.aspx.cs" Inherits="SpeakerRequest" MasterPageFile="~/MasterPages/Content.master" %> <asp:Content
Problem - jQuery post method including mod_rewrite
Hi all, I have problem with sending post request via jQuery method. Some explanation: !!! This case is working on my private PC perfectly fine. I'm using simple post method to send information to php script: $.post('do.php', {name: "John", age: "25"} , function(data){ alert(data); }); PHP Script <?php echo 'post request:'; print_r($_POST); ?> It's preatty simple... As I wrote on my PC is working fine! Unfortunately I uploaded it to 1ana1 servers.... and this is pain in the
prepend AJAX data if not exists
Hi there, I've knocked together a simple chatroom app that gets new messages via an ajax call and prepends it to the list of messages. It does this by looking for the first hidden div with ID comment_counter, which contains the ID of the most recent message in the list that the client already has. The ajax call then makes a request to another page that returns a string of HTML with just the messages with an ID greater than the most recent one. That gets prepended to the current list of messages,
check values of html array before submit
I have a form where I click a button and it duplicates the inputs thus now having X of the same inputs. The input name looks like so: <select id="select" name="cs_quantity[]"> Is there a way I can check the all values of the quantity before submitting the form? I want to make sure they've chosen a quantity other than 0, thanks.
IE6/7 issue - jQuery Dropdown menu disappears when you hover over jQuery slideshow
Hi Gents, I've run into an issue with IE6/7, involving a jQuery dropdown menu, and a jQuery slideshow. Basically, I have a dropdown menu, which overlaps a scrolling slideshow on the dropdown. The menu works perfectly well in IE8, FF, Safari and Opera. However, in IE6/7, when the menu is in its dropdown state, and the cursor scrolls over the slideshow area (which is underneath the dropdown), the dropdown disappears. I think I'm having the same issue as the poster here, but he didn't seem to find a
having problem setting margine-left value
I am appending a div tag with following jquery all going good but " margine-left " is not working $("<div>").attr("id", "container").css({ position:"absolute", margine-left:"20px"}).appendTo("div#viewer"); any idea how to solve it .
Keeping Track of Checkboxes
Hi, I have around 30 check boxes in a form and I need to keep track of their status if they are checked or not and based on that change the data in the dom. I am stuck on the logic of how to implement or code for 30 check boxes. I was using the below example code but there will be a lot of if statements as I need to always know what their status is. Is there a better way I can manage so many check boxes ? if($(this).is(":checked")) Any hep will be highly appreciated. Cheers, Vishal
"attributes is null or not an object" in 1.4.4
I use the same function as event-driven as well as simulation I simulate the applyTemp() function from the other function, it will shows the error "attributes is null or not an object" 1. function applyTemp(){ 2. try{ 3. var $this = $(this); 4. if ($this.attr('class') == 'details') { 5. } 6. } 7. catch(e){ 8. alert(e); 9. } 10. } The same method was works well in 1.4.3
Jquery Index
I have a ul list and i know index of all the li's. If i want to add a class to 7th index, how will i do that? More specifically, how will i select an element using index?
Next Page