Waiting for update of data in div
I use in my code div, which content I edit via function html(). But I've got a problem with getting new height of div. Here's example of my code: $("#idofdiv").html("nějaký obsah"); var h = $("#idofdiv").height();//Here I get bad result In line 2 I get bad result - old height before changing the content. How can I wait for updating the content, so I could get a height of new content? Thank you for your answer
1.5.1 Ajax IE faster than FireFox... do you agree?
In our experience, 1.5.1 ajax is quite a bit faster in IE8 than FireFox 3.6. It seems fast in both, but there is a noticeable difference between the two. Does anyone else experience these differences? Any big reason for the differences... like configuration or settings? Using ASP.NET 4 and MVC 3. -- patrick
Superfish bug: ie6 with jquery-1.4.4
I encountered a bug today where 3rd-level fly-out navs weren't displaying in internet explorer 6 with superfish 1.4.8. Eventually narrowed down the cause to the jquery library. Replaced jquery-1.4.4 with jquery-1.4.2 and the problem was resolved. Hopefully reporting this will help some other people and prevent some hair-tearing.
Serialize un-successful elements
Hi, I need to create a query string for all un-checked checkboxes. There is the very convenient serialize() method for checked=true but I can't find a means of getting all the values for check boxes that are un-checked. I have tried serializeArray but that returns an empty array. The context for this is that I have a select/deselect all link on a page. I need all the element values to be POSTed to the server so that the user's selection can be stored server-side in-between page requests. If they
Jquery live function is not working in my case
Hi Guys, I am very new to jquery live function & i stuck in to the problem. I am using live function to get the ajax response & appending to the div here is my code, function add_master(module_url, response_target_id, custom_id) { $('a.addclass').live('click', function() {alert('add'); $(response_target_id).fadeIn('fast'); $(response_target_id).html(loader_img_url); $.post( module_url,{'op':'add','custom_id':custom_id},function(data) { $(response_target_id).html(data); set_text_focus(); alert('ho');
click() interfering with get()
$(document).ready(function(){ $("#emailSubmitBtn").click(function () { $.get("/site/content/test.lasso", { "message": "Hello", "recipient": "Fred" } , function(returned_data){ alert("Data Loaded: " + returned_data); }); }); }); produces no returned data, but if I comment out the .click() line (and corresponding brackets) the expected data is returned. I want the .get() triggered by clicking #emailSubmitBtn. What am I doing wrong? Thanks
When checkbox checked show radiobuttons
Hello, I am a real newbie to JQuery and Javascript, but now I need to do this task for my school project, the subject's unrelated to client-scripting, but this thing just came out as a part of my idea, and I suppose the best way to do it would be using javascript, so I thought of asking here, since I am not really planning on learning JQuery for now, so I thought I could get some help around here. So, I have a couple of checkboxes, and I want to show radiobuttons whenever a checkbox is checked, e.g.
howto load a entire page with ajax
Hi lovely Jquery-Community, i want to load my entire front page with jquery, after a button is hit. Something like redirect to front-page. I've already got the handler on the button, that executes document.location.href = '/index.php'Its working, but i'd like to make its behave like(pseudocode): $.ajax('/index.php')or: $.load('/index.php') Is that possible, and if it is, how can i do that? Thanx for your advices regards dennis605
Please help modify my small script
Hi! I'm trying to modify my code but I'm new to Javascript and I need some help to figure it out. When the page is fully loaded for the first time, click on the first tab (profile) and you'll see the problem. Location of the file: http://bit.ly/gLilCo This is the code: $(window).load(function(){ $('#page2').delay(200); $('#page2').show('slow'); $('#content>dd').css({display:'block'}) $('#thumbs').jScrollPane({ showArrows:false, scrollbarWidth:28, dragMaxHeight:82, }) $('#thumbs li a').live('click',function(){
Multiple Appends
I have this code: // capslock detection $(document).ready(function() { var options = { caps_lock_on: function() { $("#capslock_append").append("Capslock is on"); } }; $("input[type='password']").capslock(options); }); for some reason it appends multiple "Capslock is on" to a div id named "#capslock_append" everytime a key is pressed with the capslock key set to on. Any help
Best way to manage .click() and .delegate() on a page
Hi all, I load a static page, inside this page there are links like this: <a href="some/path/here/with/id" class="update">Click</a> With this function I can change the link value (Click) with a second value depending on ajax response. $('.update').click(function(event) { event.preventDefault(); $.post('script.php', {}, function(data){ // Depending on the value that data has i change the link: <a href="some/path/here/with/id" class="update">Clicked!</a>
Images loading in Firefox & IE, but not Chrome or Safari
I have a jQuery based gallery (http://www.brandonboswellphoto.com/richmond_wedding_gallery.php) that will load thumbnails to the bottom of a page, however for some reason these images only load on Firefox and IE (Not Chrome or Safari). I'm not sure this is due to jQuery completely, but does anyone know why this is happening? Thank you, Brandon Boswell
how to stop the simple flash tween with JQuery?
I have made the classical tween on flash CS5 then i like to use it Wallaby-HTML5. Now i need to control my animation to play pause functionality. What could be the solution to external control over the animation of flash. Should i make the Play Pause button and how to control over through it???
Hi Everyone!
I have done a recent tree structure menu in jquery and i would like to know your suggestions on the same. Critical reviews are always welcomed. Do tell me how can i improve the code. Here is the link. http://mediamilan.com/how-to-create-simple-tree-structure-menu-using-jquery-and-css/
Modifying content of iframe
Hello I need to modify the content of an iframe. I have tried many approaches, have not yet found a working solution though. :( I do understand that there is a same origin policy, but I have disabled it via JS for Firefox and I have also tried Chrome with --disable-web-security. The following example works when I use a relative path like "test.html", It does however not work with a complete URL. Does anyone have an idea about this? Thank you so much! <!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-1.5.js"></script>
Animation on text hover
Hello everybody, I've used jquery in few sites for open lightbox, for sliders, scroll... But I don't know if it's possibly to do what I want with jquery and I've never used "effects" with jquery, so I ask you this question and how. In this flash site : http://www.veronikacugurajewellery.com/ I want to realize the same effect on the text hover but with jquery/css. It's possibly or not ? And if it's possible, how do you do an animated effect on text hover ? Thanks. Bye.
Animate using opacity works but sliding does not?
Hi all, New to jQuery and JavaScript in general so hopefully I am doing something really stupid? I have 2 divs on a page, the outer div has an inner div nested within it, both have different background images set to them. I managed to program the following fine: $(function(){ $("div.outer").hover( function() { $("div.inner").stop().animate({"opacity": "0"}, "slow"); }, function() { $("div.inner").stop().animate({"opacity": "1"}, "slow"); }); }); So that when you hover over the div, the inner div
jQuery 1.5.1 with autocomplete 1.1
Hello, we've been using jQuery 1.2.6 with autocomplete 1.1pre for some time now and it has been working ok, but after we upgraded jQuery from 1.2.6 to 1.5.1 the autocomplete stopped working. I think it's best if I just paste the code: $().ready(function () { $("#<%=txt_proizvajalec.ClientID%>").autocomplete('autocomplete/SearchCategory.ashx', { dataType: 'json', minChars: 0, extraParams: { type: function () { return "1"; } }, width: 500,
IE 8 ajax sync problem
Hi all, i used a plugin that http://code.google.com/p/jquery-loadmask/ and i used , ....click(function() { var aa = $(this); aa.mask("loading"); $.ajax({ url: url, async:false, dataType: 'json', success: function(resp){ if(resp) { aa.unmask(); } } }); } like this.. it works FF and others but i cant see loading in ie.When i wanted to find problem, i deleted "async" so it would be true and then i can see ie.But, my ajax must be
Using .not() and .first() @ same call
Hi all; I have a a problem using .not concatenated w/ .first and would like some help if possible: <div class="innovempty cloned"></div> <div class="innovempty"></div> <div class="innovempty"></div> <div class="innovempty cloned"></div> would like to get something like $('.innovempty:not(.cloned).first').remove(); the 1st innovempty which is not .cloned is there someone which has a suggestion? Thanks in advance!
Slide Rotator - list items on slide
Hi All I am trying to create a slide rotator. Have been successfull with that. However my problem is that over each image i need to have a div with hyperlinks. As the image slides i need the div to slide with it and on the new image i need a different div with different set of hyperlinks. My code so far is as such: <!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"> <head> <meta
value set in an event handler using css() method is not get next time
hi, I've a very simple code where i am setting the font-size to currect font-size + 2 for a paragraph. Its set first time but when next time event handler is called it gets the same old value. code is ... <!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"> <head> <title></title> <script type="text/javascript" src="jquery-1.4.4.min.js"></script> <script type="text/javascript">
Image Slider Help
having a problem with my image slider need help http://sldim.com/myspace/index-2.html
How do you check if a select option has been selected and then hide a div?
I tried using the following code to check if the user has selected a particular option in a single select drop down has been selected, then add a class to a div to display it but it's not working and I can't figure out why. I've tried a ton of other things to but this one seems to make the most sense. if ($("#existing-subscriber option[value='Yes']").attr('select')) { $(".information").toggleClass("show"); }
Selection field + disabling fields
Got some problems with a php script that outputs a jQuery script. The purpose of the jQuery code is that when you select an item from the select field that other items need to be disabled(works correct in all conditions) and that at the same time text in corresponding divs' text are altered. The thing is that the script basically works.. however when you've made a selection only the disabling works everytime but the divs are only updated once, so you need to refresh the page if you want to do it
Jquery datepicker implementation
Hi guys, Ive got the datepicker working on this page: http://www.deans-place.co.uk/site1/date2.php Im now trying to implement it into my form. So far ive added the includes for the datepicker to my existing form header so it looks like this.... <link type="text/css" href="themes/custom/jquery-ui-1.7.2.custom.css" rel="stylesheet" /> <script src="includes/jquery.js"></script> <script src="includes/ui.core.js"></script> <script src="includes/ui.datepicker.js"></script> <script type="text/javascript"
Am i missing something? List of css properties available in jQuery .animate()
We've started using a lot of jquery animation, the difficult issue im having is finding a list of css properties you can use in the.animate() function? I seem to come accross this problem with a lot of jQuery - some great examples but no lists of properties and variables and what to expext in those variables for functions. Surely im missing something? Some super big help area or manual that lists all this stuff in?
Fade in chosen photo
Im using the code below for a gallery, where you click on the thumbnail and the large image appears on the right hand side. It work's great, but I would like the image to fade in instead of just appear and I can't seem to find where to enter the .fadeIn(). Thanks for any help <script type="text/javascript"> //gallery $(document).ready(function(){ //Swap Image on Click $("ul.thumb li a").click(function() { var mainImage = $(this).attr("href"); //Find Image Name $("#main_view img").attr({ src:
submit event
Hi all, I have a problem with Jquery's submit event (I'm pretty sure it's a lame one because of me being tired...) I'm using jquery and cakephp 1.3 to send some data in ajax. The problem is, it reloads the page with the request but doesn't uses ajax... here is my code <?php echo $this->Form->create(null, array('type' => 'get','id' => 'searchtagform',array('url' => ''))); echo $this->Form->input('tag', array('label' => '','id'=>'searchField')); echo $form->submit(' ', array('label'
$.get [getting the contents stored on a text file]
Hello, I'm just too vague over my understanding as to what I know so far may be true or not. Suppose, I a text file stored on the server. We all know that when a file stored on a server is opened for viewing, some bandwidth is consumned and the consumption increases with every refresh of the page and so on. So if i use $.get on the client browser to reteieve the contents of the text file stored on the server, will it affect the server bandwidth consumption? I just want to make it clear that it
Not able to add a class to the parent
<ul id="menu"> <li><a href="#"><strong>Electors</strong></a> <ul> <li><a href="A.asp">Conditions Required</a></li> <li><a href="B.asp">Verification of Entry</a></li> <li class="submenu"><a href="#">Special Measures</a> <ul> <li><a href="C.asp">Documents of cultural communities</a></li> <li><a href="D.asp">Measures for remote regions</a></li> </ul> </li> <li><a
Problem with Ajax .get ?
What is wrong with this? Trying to return text data from an ajax call. Getting a syntax error $.get('APAJAX.PGM', ({vendor:$vend, invoice:$inv}) function($text) { }, 'text');
Event firing twice (again... I know...)
I notice that there has been talk about peoples Jquery functions firing twice. But none of the answers to their problems seem to solve mine.. Can anyone tell me why this event i fired twice: (When I click any one of my links with the class "popweb_jquery_tran", the event is being fired twice) $(document).ready( function() { $('.popweb_jquery_trans').unbind("click").click( function(){ $('#JQ_content_box, #JQ_footer_sublinks').animate({ opacity: 0 }, 500, function() { }); return false;
Issue with using .Get with a relative path URL.
I'm having an issue using .get and a callback. Basically, unless I use a fully quantified path when I deploy my site the call doesn't work. When I'm developing on localhost, the site works fine. It's an ASP.NET MVC site. I'm fairly new to jQuery... If I replace the code with an absolute path, all seems fine. Obviously I'd rather use relative paths... I'd be grateful for any insight you could offer... Here's the code: <script type="text/javascript"> $(function () { $("div.initiative").click(
jQuery .animate to bottom of view port?
Hi All. I want to animate a div on my page from the middle of the view port, to the bottom of the view port that the user can see on the screen. What I mean is that, no matter what size the window is, the div would start in the center (vertically) of the screen, and when clicked, would animate to the bottom of the view, without making a scroll bar. I have the div animated, but I'm unsure on how to get it to react to the user's view (window size). Any help please? Daniel.
ajax call to server fails
I've been trying to do a quick timed "server status" script, but it's not working for remote servers (only for local files). I get a consistent errors return even on 200 status return codes for remote servers. ie. url:"file.ext" works while url:"http://server.address" doesn't. Below is the snippet: function srvstats(){ $.ajax({ url: "http://server.address.goes.here/", cache: false, success:function(response){ $("#serverstatus").removeClass("down").addClass("up"); $("#serverstatus").html("Server
Why doesn't bind() work with browser plugins (COM objects)?
Windows Media Player, Adobe Reader, etc. None of these can have events interacted with via jQuery's bind(), although falling back to the native implementations work fine. Anyone know why is this?
IE9 + prototype + jQuery conflict
Hi Everyone, I've noticed this strange conflict when trying to get the width of a jQuery object in IE8/9 when prototypejs is also loaded. I'm using the latest version of prototypejs. version 1.7 IE8/9 w/o prototype works correctly. IE7 w/ prototype work correctly. The object I'm trying to get the width from is a DIV with absolute positioning and a width of 500px in the style attribute. It's called #INFO_DIALOG. // supposed to return 500, but returns the WINDOW width. same as jQuery(window).width();
Jquery Issue
I have content (done in jquery) that gets added to a website (anyone on the web, which means I have no way of knowing what they are using). I started with doing a jquery check to see if jquery needed to be installed, but found that my content needed a new version, which others didn't have installed on their site. I am now trying to figure how to go about allowing multiple versions of jquery on a site... so their site could have <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.1/jquery.min.js"
Convert table to list
I am converting a <table> to list (<ul><li>) I have 25 row and each row has 5 col. I'm putting the first col into an <li> and getting background color from the remaining 4 col. my code works for the colors however I'm not sure why? I'm only looking at the first child in the <tr> and yet it's returning the color for all 4??? Also I need to count the rows and add to the current rendered list function convertToList() { $('#tblHospitals th').remove(); var list = $("<ul></ul>");
Next Page