How can I make the "live" event method work without using a particular event?
How can I bind the "live" event method continuously to a function without i.e. the "click" event? At this time I have to click my HTML twice before it picks up the PHP generated content and works fluently. Thanks for your help! $('.clickme').live('click', function() { // Live handler called. });
live and toggle
Hello I have a ajax menu that fetches data and returns it in json and then rebinds it to the page with live. This is very similar to a tree menu but it is text instead and horizontal This works great for the most part but sometimes it misfires when using .is(':hidden') and it ends up getting the data again and no matter what it will just keep adding the same data over instead of toggleing and closing the menu. Any ideas? Below is the code I am using. $(document).ready(function(){ $('.cat',this).toggle(
Loading jQuery on parent page via an iFrame
Hi, I believe I have pretty unique request ... I'd like to know if it's at all possible to load jQuery and run scripts on a parent page via a hidden iFrame. I know this may sound strange, without getting into a great big explanation, we don't have access to code on the parent page so we cannot load jQuery or any JS for that matter. We can have a hidden iFrame and call a custom page - where I'm hoping we use to load jQuery and other custom code on the parent page via the iFrame, We need to show an
animation order problem
hi there, i'm doing an animation which is split in two section which are split in two theme selfs. the first step is to move some elements with the .show class, than change them class into .hide. the second step is to change the classes (.hide) of some hide elements into .show class; one achieved that the changed items has to move. the result is that the first part of the first step is totally ignored when you try to switch from a service to an other (the services are "isp", "videosorveglianza",
(Ajax form submit) many multiple select and only one call !!!??
Good day ;) I have this form with 2 multiple select, select, checkbox, radio and two textarea. I know how to use $.post() or $.ajax() and send the data to a php script but HOW CAN i send the data in the ajax function when i haven't a single dimension array !? it's like : ------- data(product)(1) = "Adobe" ------- data(version)(1) = "CS2" data(version)(2) = "CS3" <------multiple select name=Version data(version)(3) = "CS4" data(version)(4) = "CS5" ------- data(impact)(1) = "DoS"
Tru Accordion then use button to open a dialog box?
Hello everybody, I'm new user of jQuery and no idea bout AJAX. I'm developing a page using accordion. Inside the accordion, i like to put button to open a dialog box. Is it necessary? If can, how to make it? Can someone show me how or just give me some link to refer.. TIA
.load function problem
hi there i have jquery code as below jquery.js file $(document).ready(function(){ $(ul#name).load('hello.php?val=0",function(){ if(conditional statement) { //do something with li tag generated from hello.php } elseif(condition) { $(ul#name).load("hello.php?val=1",function(){ do something with li tag generated from hello.php } } }); }); hello.php value=$_get['val']; for(loop) { echo '<li id=$i> $i </li>'; } i know i am doing mistake here . i just want to change
How do I stop the cascade effect of a selector
I want the list to close when the user clicks off the list. So anywhere on the page. That's why i'm using the body tag as the selector but if they click on my list I don't want the function to fire. $('body:not(.mylist)').click(function () { if ($('.dropdown1on').size() > 0) { $('.dropdown1 ul').hide(); $(this).removeClass('dropdown1on'); }; });
Problem with making a div replace another div and further jquery functions
Hello, I have a page where when a button is clicked, I want that div to be replaced by the content of another div (which loads as display:none). I first tried fadeOut/fadeIn but the div will not occupy the same space as the div it's replacing, no matter what I try (such as giving it a high z-index). The way I was able to achieve what i wanted to do was like this: $(document).ready(function(){ $("#reply-button").click(function(){ $('#showprofile').html($('#showreply').html());
'Not' isn't working.
Can someone explain why this code still gives the alert even when a link has a class of 'current'? $("#nav a").click( function ( event ) { event.preventDefault(); if ( $(this).not(".current") ) { alert("Do Stuff"); }; });
Do stuff on :not class current.
I know this should be simple, but I don't know the correct way. If a link does not have the class current when clicked on, I want to run some code. I also want to make sure the default behavior is disabled on all links. This is what I have. $("#nav a").click( function ( event ) { event.preventDefault(); $("#nav a:not(.current)", function(){ alert("Do Stuff"); }); });
Please help me finish what I started...
I know VERY little about jquery or java. The site I am having a problem with is here - http://www.kmkmediagroup.com/RainierValley/TestSite.html Yes, its very ugly at this stage but only up to ask my question. When you click about, that works fine. Its the services area that is the problem. When you initially click "services" You see 3 colored services buttons and should see service 1's image and text. However depending if you've clicked on services before or after you've clicked on "about"
variable transmission
Hi all, i have a little problem in that code: <script type="text/javascript"> $(document).ready(function() { var posmiesiac, poskredyt; var valKredyt = [1000,2000,3000,4000,5000,10000]; var valMiesiace = [12,24,36,48,60,72,84,96]; var tabeladanych = new Array( [1,1000,2000,3000,4000,5000,10000], [12, 101, 202, 303, 506, 1012, 0], [24, 54, 109, 164, 274, 548, 823], [36, 39, 79, 118,
$(document).ready()
$(document).ready() is not working as our expetations. we are expecting this function to fire after complete page load process but is not... is there any other function which fill fire after complete page process done.
Understanding how .ajax URL work
Greetings, I am trying to use the regular .ajax functionality and it works great on most browsers but I noticed a phenomena: When I make an ajax request outside the "root" / index file it adds "/" to the end of the request which results in a 404 request... How can I eliminate this behavior and how does url really work in the ajax request ? Thank you for your help, Alexander
e.preventDefault();
I've got an <li> that, when clicked, toggles the display of a div with a bunch of links in it. I am using preventDefault() to stop the anchor tag associated with the <li> from navigating to the link (I, instead, want the sub-menu to display). The problem is... using preventDefault() on the <li> removes the default behavior of all the links under the <li> tag -- including those in the sub-menu that I want to display. The menu system is currently set up as a hover menu and the sub-menu drops down
Show but effect moves down instead of diagonal?
I've got a div with a border around it. I'm using toggle so that when you click on a hyperlink on the page, it toggles and shows that div. When that div renders with the show, the border is painted diagonally when it starts to render to the page. Is it possible to make that render action somehow render up and down or even a different type of effect? I do not like how the border panes diagonally when that div is shown. I can't find anything yet in the jQuery docs that would allow this. Maybe I
sort by row not by column
I've been googling for more than an hour but i didn't get pugin to sort by row. Every other "sorter" plugin sort by clicking on column header. but I want to sort by row by click on particular row. a solution for this, maybe is to invert the rows and columns, then use regular sorter to sort by column, and then invert again. I'm stuck in this lead also. i'm not getting any table inverter. please help. thanks in advance.
getJSON select problem
Hi there. First of all, I´m a newbie with all of this, so if this is a rookie mistake.. sorry. Right now I am using the code below to fetch some messages, and it works great. However, what I want to do is to fetch only the messages where "type" is set to "status" and nothing else. How do I do that? $.getJSON("https://graph.facebook.com/me/posts?fields=message,type&access_token=" + fbToken + "&callback=?" ,function(fbUser){ document.getElementById('fbUserStatus').innerHTML = "" + fbUser.data[0].message
AJAX Calls Not Working on Local Computer
Hi all, I'm trying to load a Javascript file which contains an array of data using .getScript(). It works fine on my server, but the request is never being made when I run it on my own computer, though the callback function is called. Is this an inherent limitation in JQuery/AJAX, or am I doing something stupid? Here is the relevant code: var data = []; // To be defined in data.js $(document).ready(function() { $('#button').click(function() { // This should load the file specified in the text box,
looping thru an array...
I don' t know what I'm missing here.. $("div#carousel a").each(function(i) { $(this).click(function(e) { e.preventDefault(); console.log(myArray[i]); }); }); it doesn't loop, it always prints the first item in the array (there are 18 <a>'s inside div#carousel, and 18 items in the array...) thank you...
defining utf-8 encodage when posting data
Hi all, I'm using the post function to send data. the problem is when I'm sending the data with special characters like é à ù è ..... the server display this characters é à è ù Does anyone know how i can specify the encodage *. My server side is a tomcat and the page which processing the data is a jsp. My jQuery code : $.post( 'addAnnotation.jsp', { note: note}, function(data){ alert('ok'); });//end function My jsp code : <%@ page language="java" contentType="text/html;
How does one loop and pause with functions?
A: Pause for 1 sec $('#linktwo').animate({opacity: 1}, (250)); $('#linkone').animate({opacity: 0}, (250)); Pause for 1 sec $('#linkthree').animate({opacity: 1}, (250)); $('#linktwo').animate({opacity: 0}, (250)); Pause for 1 sec $('#linkfour').animate({opacity: 1}, (250)); $('#linkthree').animate({opacity: 0}, (250)); Pause for 1 sec $('#linkone').animate({opacity: 1}, (250)); $('#linkfour').animate({opacity: 0}, (250)); Loop Back to A As you can see ^^ that is what I want to make, but I don't know
If Else Statements in jQuery - *issues*
Ok so I am attempting to make an image fader, it has two arrows that appear when you mouse over the right or left had side parts of the image. When you click the right arrow, I want the image to fade into the next one, so I wrote up this code: $('#rightclick').click( function(){ if('#linkone'.opacity="1") { $('#linktwo').animate({"opacity": "1"}, (500)); $('#linkone').animate({"opacity": "0"}, (250)); } else if('#linktwo'.opacity="1"){ $('#linkthree').animate({"opacity": "1"},
jQuery on iPhone Safari - Not working!
Hello, Everything I've read says that jQuery should run on iPhone's Safari browser, and yet I can't get it working! I tried this simple code, which should turn my div background yellow: <html> <head> <script type="text/javascript"> $(window).load(function() { $('#test').css('background', 'yellow'); }); </script> </head> <body> <div id="test" style="width: 100px; height: 100px;"></div> </body> </html> This works in every browser I've tried, including
Superfish menu - how to set width to maximum?
Hi, I've added a superfish menu to my site but I can't seem to get the menu's width to go right across the page (100%). Here is the site: http://67.220.209.194/~joomlate/ - as you can see the menu at the top only covers about 50% of the screen and I'd like it to stretch across the page. I have this in my superfish.css file: /*** DEMO SKIN ***/ .sf-menu { float: left; margin-bottom: 3px; text-align: center; } .sf-menu a { text-decoration:none; border-top-width: 1px; border-bottom-width:
Slowly change class
Hi, I'm new to jQuery, and I'm trying yet to discover what it offers. So, I'm stuck with problem of trying to change class of <a> tag, but with slow animation. So this is my script. $(document).ready(function() { $('menu').hover(function() { $(this).addClass('menu_hover').show('slow'); }); }); But this seems to not working..
Delete Item by drag and drop
Hello everybody Sry for my bad english, but i hope u understand it :) I have 2 <div> 1.) <div class="draggable">Hello</div> 2.) <div class="draggable">World</div> and a Third 3.) <div class="dropable">Delete</div> Now i want that the 2 are draggable and if I drop one in to the Delete box the item(only one) will delet. _________________________ So nochmal auf deutsch Ich hab 2 div container beide haben die klasse draggable. Nun hab ich noch einen 3ten. Nun möchte ich wenn ich einen der beiden draggable
How to set some items of an Ajax Toolkit ComboBox to bold or to a different color?
We want to emphasize the top about 10 items (number varies based on other criteria) in bold or perhaps a lightgray background. The Ajax Toolkit ComboBox is filled from an SQL database. After it is filled (or perhaps while it is being filled) we'd like to bold the top so many items. How to do this in JQuery?
Top Nav when hovered doesn't keep consistant original heights for each ul in its hover state.
jQuery(document).ready(function(){ $( '#nav_Primary > li' ).hover(function(){ alert($(this).find('ul').outerHeight(true)); $(this).find('ul') .stop( true ) .animate( {height:'toggle'}, {duration: 600, easing: 'swing'} ); }, function() { $(this).find('ul') .stop( true ) .animate( {height:'toggle'}, {duration: 600, easing: 'swing'}
Cascading dropdown menu problem, not able to dynamically populate and display Select controls
Hi, my code is able to create the 1st Select control but nothing happens for the 2nd and other Select controls. I debug through the code and the JSON function called, $.getJSON("/SearchMembers/GetChildResearchInterests/" + $(this).val(), function(json), from this function's code I see that it's returnning valid data. However, nothing is happening from the code after that. I tried putting alert debugging messages but that don't get display atll. Appreciate any help here. Thank you. Here is my
Calling / Using a PHP variable
Hi everyone, I am using JQuery to append a list item (to a ul on page 'tracks.php') generated on another page ('add_track_to_db.php'). This works fine, but I also need to retrieve a PHP variable ($prev_track_order) from the latter to manipulate in a JQ function. As you see, I am currently using a piece of PHP code in the JQ which doesn't, but this is probably because it isn't being carried from the add_track_to_db page. Is it possible to request and receive two separate responses, or is it a simple
Preventing slider from passing last element?
So I was looking through ton of tutorials and plugins out there and found what I think is the simplest content slider I've ever used. It's great and it uses small enough code profile to prevent breaking everything around it. However, I'm having this issue where if you hit the last element, and hit "Next", it will scroll to empty space, and keep going. Same with if you hit "Prev" on the first item. function slidePrev(){ if(parseInt($("#content ul").css("left")) < 0) { $("#content
using XPath to replace the onClick action..
I have been using XPath until there , only for getting info in the DOM, Now, I'd like to modify the onClick action parameter ( '123' in this case...) "replaceAttachments('123')" by another one '567' ( var id = '567' in this case) to get : "replaceAttachments('567')" here is the element line :<li><a onClick="replaceAttachments('123')" id="tab3" style="visibility:visible;" >Attachments</a></li> how should I do ? thanks for your help..
JQuery Accordian Margins
Hi, Firstly if I am posting this in the wrong place, I'm sorry. I'm pretty new to web design and i have a Joomla website which I am currently developing, and I am using a module called JTabs which creates an accordian using JQuery. I have managed to make all the CSS changes I need bar one. Currently the last inactive tab sits directly in line with the top of my footer. Is it possible to add somthing to jquery-ui.css to add a margin-bottom to the last inactive tab in the accordian. I don't want
lightbox and mysql
is there a way how can i use the lightbox/modal to populate datas from mysql database then be available for editing??..
Content inside div shows after animate
Basically, I am trying to animate the width based on the click of a div similar to an example I found online (jQuery Top Panel), and it seems to almost work. I can get this to go from not visible to showing, then to animating, but the problem is when I go to set my width to zero. What is happening is that it will show the contents just to the right of the div. Please help me out dudes. It appears as though once I do an animation, I am unable to touch the css of a div and at the same token, when
j media element - not only just another html5 audio / video player
I would like to announce the first release of my current project, called jme (jQuery Media Element). Although you could think it's just another HTML5 audio / video player with Fallback to Flash or VLC-Plugin, it's a little bit more. It's a kind of a development kit to let you create your own cross-browser-/cross-plugin/cross-device supported multi media application. Embedding a media element is dead easy, the controls are little building blocks for flexible, semantic markup and distinct theming and
How to make a button disabled after 3 clicks?
Hi, I have a button and I want it to be disabled (not clickable) after 3 clicks. Also the button text must change at each click. Example: Test (3) <- button with text -click- Test (2) <- button text changed -click- Test (1) <- button text changed -click- Test (0) <- button can't be clicked anymore (non active button now) How to do this? Thanks
how to save the items that i add in a "shopping cart"
I get the items via .droppable but i don`t know how to make that when i refresh it will keep my products in the list. And second , to make a submit button that will emial me all the text that i added in the <li class="placeholder">Add your items here</li> http://www.roxymob.ro/pagini/jquery.html
Next Page