Tabs links inside tab to other tabs work but active class not visible & external link not working
1) I'm having issues with jquery and the tabs I'm using. My tabs work but... I want some more functions and that seems to be a big problem for a Javascript and jquery newby. My HTML: <ul class="tabs"> <li>Tab1</li> <li>Tab2</li> <li>Tab3</li> <li>Tab4</li> <li>Tab5</li> <ul> <div class="tab_container> <div id="first" class="tab_content">...</div> <div id="second" class="tab_content">...</div> <div id="third" class="tab_content">...</div> <div id="fourth" class="tab_content">...</div> <div
Attach the <script> tag to the head
Hi fellas! I have a problem with adding some script files to my page. I update all the content on the page via ajax, so if on a new page I have some new js/css - files I haven't on previous, I need to attach 'em. In success method: // Attach the css files if ( css.length > 0 ) { for ( var i in css ) { if ( $('link[href="' + css[i] + '"]').length == 0 ) { $('<link />', { href : css[i], media : 'all', rel : 'stylesheet'
here is the IE 8.0 error: HTML Parsing Error
hi have this error in IE 8.0 it is due to the jquery files which i currently used. when ever i include them the IE 8.0 gives that issue. the files which i m using are as following, <script src="js/jquery-ui-1.8.9.custom/development-bundle/jquery-1.4.4.js"></script> <script src="js/jquery-ui-1.8.9.custom/development-bundle/external/jquery.bgiframe-2.1.2.js"></script> <script src="js/jquery-ui-1.8.9.custom/development-bundle/ui/jquery.ui.core.js"></script> <script src="js/jquery-ui-1.8.9.custom/development-bundle/ui/jquery.ui.widget.js"></script>
livequery still needed?
Hi, I'm using livequery on my pages... I just read the documentation for http://api.jquery.com/live again, and can not remember why I required livequery plugin in the past... Is there any difference between the two of them? I though there were limitations to live() earlier, but I don't see it anymore. I'm sure there was a reason why we moved to livequery in the past, but perhaps we need to revise that decision. Can someone enlighten me perhaps? --- http://www.flexin.be
nth-child problem with generated table
I'm creating the header and first line of a table and use jQuery to duplicate the first line. I'm then having trouble accessing a particular columns input field. I've created a small demonstration and it seems to work in Firefox 3.6 and IE8 but doesn't work in Safari 5 or Chrome 9. It should put an 'A' in the field 3 input box. Any work arounds?
Sorting by size and name
Hi, well i wanted a little help i have a script which sorts things alphabetically as starting from A to Z, well that's awesome but it does another thing that is it also sorts things according to size, so i have issue with the size thing as it bring those first which has small size and puts the heaviest at the end as 100kb is placed first and 1200kb is placed later, i want size sorting to bring heavy size first and low size at the end, i mean to say i want it to be opposite of what it is doing, well
html() and IE
simple code page with div content, there some things and i do : alert( $("#content").html() ); gives me really nasty code in IE it adds some of default values, changes code to uppercase as for really old html opera and firefox works fine is there a way to avoid custom code added by IE? using ie8
how to target (and change) an element that contains specific html.
Hi, I have a html page that contains a number of <H2> tags. I need to find this specific <H2> tag: <h2>Submit Your Survey</h2> ...and then replace the text 'Submit Your Survey' with something else (such as 'Click the button below'). How could I do this? Thanks in advance for your suggestions!
Multiple accordions in the same page ?
Hello everybody, First excuse my poor english but I'm a french girl :) I have succeed in using JQuery tabs + accordion in my page, it works perfectly. However, I need to use several accordions in the same page, so when I try this, the second accordion doesn't work : <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>jQuery UI Example Page</title> <link type="text/css" href="css/ui-lightness/jquery-ui-1.8.10.custom.css" rel="stylesheet"
iFrame ScrollBar Exists
Please can someone help me with detection if iframe has vertical ScrollBar visible (exists). iFrame settings are: <iframe height="800" frameborder="0" width="690" scrolling="auto" hideadminborder="False" src="www.crossdomain-site.com" id="dnn_ctr869_IFrame_htmIFrame"></iframe> i have try alert( $("#dnn_ctr869_IFrame_htmIFrame").css('overflow-y') ) but i get: auto even if vertical scrollbar is visible or not. Please if someone can contact me with pvt mail for sharing link problem ...
Problem with IE8 on animation
Hi on my site I am having a problem with JQuery powered animations in the lower part, they are sort of blacked out, see the site and you will understand http://bit.ly/bNGH3h How can I fix it? Works fine on Chrome and Firefox
jQuery Accordion Internet Explorer IE CSS Issue
Hello, I'm testing the jQuery accordion with a custom theme (via theme roller) in Firefox and Internet Explorer. Firefox looks goods and works well, whereas IE works well but the CSS is not correctly formed. I suspect this has little to do with jQuery and plenty to do with my understanding of IE and/or a rookie mistake. My accordion is thus... <div id="accordion"> <h3>First Header </h3> <div><p>First content</p></div> <h3>Second Header </h3> <div><p>Second content</p></div>
How to use .dataTable() with a table filled with .tmpl()
Hi all, I've a table populated with .tmpl(), so far so good, now I want to use .dataTable() because I want pagination e and filtering, is it possible? I've tried in the classic way $('#table-id').dataTable(); but doesn't work. Any idea?
help with checking form fields
I am working on a function to test for valid email addresses that I can't quite get to work - what i want to do is parse through the fields with a certain class. My code is as follows but it is not working as yet.... $('.test').keyup(function() { isValidEmail($this); }); function isValidEmail(field) { var email = field.val(); if(email != 0) { if(isValidEmail(email)) { $(this).removeClass('invalid');
Strange behavior when using $.get between localhost and another local domain
The following doesn't come across as a cross-domain issue, but it smells like one. So here's my setup (that's quickly making me grey): I have an index.html file that is loading a flat file called config.json that resides right next to index.html. I have used both $(document).ready() and window.addEventListener('load'... to do this: $(document).ready(function(){ $.get('config.json', function(data){ alert('asd'); }) }); The alert *almost* never fires. This happens in Chrome 9 and Firefox
getJSON problem
Hi there, I am new to JQuery and I am trying to implement the getJSON function. my code for utilizing the getJSON follows: $(un).blur(function () { $.getJSON('Services/UsernameAvailable.aspx?' + escape($(this).val()), function (results) { alert(results); }); }); where un in a reference to a Textbox. I can debug and verify that the call to 'Services/UsernameAvailable.aspx?' + escape($(this).val())
google maps and geocodeing with jQuery?
Hello there! I was wondering if this scenario is possible with jQuery in combination with Google Maps: #1 - Let a user input their address into a form text field and geocode it into latitude and longitude. > I'm letting the users select their municipality from a list before they enter their street address. Is it possible to update the map to show the selected municipality on click? -- I have the municipalities stored in a MySQL-table. I could store som longi-/latitudes there to use... > When the
Abort doesn't seem to close the connection
Hi, I have been fighting with JQuery, and I got beaten badly. What I try to do is launching an ajax request, and if I don't get the answer soon enough, launching another one. The problem is that I have to wait for the 1st one to complete in order to get the result of the second one (even with the abort method) This is my code (test 1 is called first and it calls a php function which waits 10s, then return something (so we have the timeout instead of the return of the function) and calls test2 in
Remove checkbox value from xml string with click of a separate checkbox
I have a function that builds an xml string from all selected options in a form like this function SetServices() { var services = '<SERVICE><SERVICECD>1KNTK</SERVICECD></SERVICE>'; $(":checked:not([name='ServiceType'], #Standard, #NoneForex, #RTT, #PRN, #BW, #Metrics, #STATUS :input, #EX_AGREEMENTS :input, #final_step :input)").each(function() { services += '<SERVICE><SERVICECD>' + this.id + '</SERVICECD></SERVICE>';
Reinitialize document ready after AJAX and jQuery
All, I currently have this code to make a post to my database: var $dataString = 'name='+ $name + '&black_white=' + $black_white + '&color=' + $color + '&color=' + $other + '&other_text=' + $text; $.post("save_edits.php", {image_save_string: $dataString}, function(result) { $("#multiple_images").hide(); $("#result_success").html("<font color='red'>We've successfully saved your photo edits!</font><br><br>"); $("#image_divs").html(result); }); Within the result I'm actually recreating the form for
$_GET[' '] with modal
hi, i have a modal window in a link <p><a href="#window1" class="modal">Modal Link</a></p> but i need it to integrate to my link which has a url to be use in GET method. <a href='Uploaded_Fileslist.php?compid=$compid&areaid=$areaid '>$area</a>first, the link will direct it to Uploaded_Fileslist.php and get the value for compid and areaid second, after querying the values, it will popup as a modal. please show me how TIA!
Strange table row show/hide problem
I've got a weird problem that I'm experiencing and I was wondering if it was a known issue. I have a table, and certain rows are created (by server-side script) as follows:- <tr class="PSRow" style="display: none;"> I then have a script which is tied to a checkbox:- $(document).ready(function() { $('#PSHide').click(function() { if ($(this).is(':checked')) { $('tr.PSRow').hide(); } else { $('tr.PSRow').show(); } }); }); now most of the time this works fine, the table is loaded without the
jQuery form validation question
Seems I did over look the jQuery code. I'm not sure what the proper syntax is to expand this code to work on not just "input" fields but also "textarea" field. To test I simply replaced input with textarea and it works, but I need both and every combination I've tried does not work. Code is below... Thank you. <script type="text/javascript"> $(function(){ // Grab each form element $("label[title]").each(function(){ $(this).append("<div
Syntax for object with multiple elements
Hello, I'm quite new to jquery and i would like to know the best syntax to create an object with couple of DOM elements. I mean something like this: $('<div/>').append(newBlock()); ///// function newBlock() { var $block =$( $('<h1/>') .text('Title'), //???? $('<h2/>') .text('subTitle')); return $block; } I know this synthax isnt correct, but thats give you the idea of what i mean. I can get it work like
Where to put the .fadeIn(); in this tab-script?
Hi there, Currently I am using this very simple tab-script. Took it from: http://jqueryfordesigners.com/jquery-tabs/ All works fine, but I want to use the .fadeIn(); option, so that (when I switch tabs) this goes nice and smooth. But where to put this .fadeIn();? The code: <script type="text/javascript"> <!-- Tabs --> $(function () { var tabContainers = $('div.tabs > div'); tabContainers.hide().filter(':first').show(); $('div.tabs ul.tabNavigation a').click(function
Dealing with radio in JQ
So I have two radio buttons... <input type="radio" name="radiodate" value="1">Today <input type="radio" name="radiodate" value="2">Other <input type="text" name="date" size="10" maxlength="10" placeholder="mm-dd-yyyy"> I would like to disable / hide that text input based on user selection of above mentioned radios. Would this work? Something tells me I'm missing something. var $txtDate = $("input[name='date']"); $txtDate.addClass("hidden").attr("disabled","disabled"); var $radioDate = $("input[name='radiodate']");
How to parse (query) content from a Ajax request?
Hi, I want to do a Ajax GET request and then parse the resulting HTML to get a list of products from that page: $.get("http://www.americanas.com.br/busca/baskervilles?dep=256705", function(data) { var domData = $(data); alert($("div.hproduct", domData).length); }); This doesn't work. I get an error ("div is null") right on the first line of the function. The error is from jquery code. Can anyone help? Thanks.
Problem on attaching event
Hi everyone, I have tre select. - the first one has attached a change event which modifies the second one - the second one has attached a change event which modifies the third one. Now, the first select correctly works but after the call, the second select is not able to recall the associated event. I suppose it is connected with the previous call of the first event and that I probably have to reattach in some way the second event but I don't know how. Could someone help me? Giorgio :: Giorgio Nordo::::::::
Problem with function repeating itself
Hey, I've got a big problem with one of my functions I need for my project. Everything works fine except of the thing that the function repeats the more often you call it. For example if you called it the first time everything works fine. But the second time the first call gets repeated as well as the new one, so I get two functions... A little sample of this code can be found here. To see the problem click on the Divs containing "T2" and leave the Popup. You'll get an alert. Thanks a lot, picola
jQuery form validation question
I've been following this tutorial (and it works great) > http://www.webdesignermag.co.uk/tutorials/add-client-side-form-validation-with-jquery/ Just cannot figure out how to make one of the Text Fields a Text Area with cols="45" rows="5". Every combination I've tried turns off the validation. I've already added completely different text fields from what are shown in the tutorial so I know how to change up the javascript I just can't get the Text Area right. Thanks in advance.
Echo the .lenth value?
Hi guys I just want to echo the .length value of all images that has an 'alt' attribute. $(document).ready(function(){ $('img[alt]').text("Found " + $("img[alt]").length + " img alt attribute."); }); Is my codes above correct? I tried it, and I did not saw any output. Can you spot the not? Thanks in advanced. -warren
[jQuery] Toggle visibility.
Hello, I have an anchor on my page. When I click it I want to Toggle the visibility of a Div with ID = "Content". If the div is visible then it should become invisible. If it is invisible them it becomes visible. How can I do this? Thanks, Miguel
restart ajax request after abort
I have a function, something like this: function temp(){ $ajax_request.abort(); ... some operations ... $ajax_request = $.ajax({url: url, type:'POST', dataType: 'json', data: {...}}) .success(function() { alert("success"); }) .error(function() { alert("error"); }) .complete(function() { alert("complete"); }); } this function may be called frequently, when previous ajax request is not completed. I need to avoid situation when several
set drop down list value
The last two lines of the following code is not setting the value of the selector unless i debug it within firebug. when I set a breakpoint on those two lines it shows the val in the parentheses and it will set them correctly, but if I do not debug the script then it doesn't set them. Anyone have an idea as to why? populateLists: function(executionLevel, contractor, program) { var _chart = this; $.each($('select#contractor option'), function() { if ($(this).val() != "all")
Problem using $.each() on json containing "length" key
When trying to iterate over data using jquery's each() function, if my json contains a key named "length", I don't get any results. This json works: echo '{"title":"test","lengths":"3"}'; This doesn't: echo '{"title":"test","length":"3"}'; I'm using jquery and jquery ui. Anyone know how to avoid this problem? Here is my code: $.ajax({ url: "http://example.com/page.php", type: "GET", dataType: "json", success: function(json){
Error with using method getJSON in jQuery 1.5.1
I've used in my project jQuery 1.4.4, decided to move to version 1.5.1 and I have a problem with method getJSON. My JS code: $.getJSON("<s:url action="checkRegistryErrorsNumber" includeParams="none" />", {"registry.id": <s:property value="registry.id" />}, function(data) { $("#errorsNumber").text(data.errorsNumber); if (data.errorMessage != "") { $("#messagesBlock").html(data.errorMessage);
Number behind in pic count (1/10) etc.
Hi there, Bit of a newb but just having a small problem using jquery cycle all plugin. I am trying to create an image gallery, with two buttons next and previous which work fine, and with a counter like (1/10) etc. I've got it to work but for some reason the slideshow never counts the first image so therefore is always one image behind. Somebody pointed out to me it is probably that the array starts at 0 and something else at 1, but I'm not sure where to find this really so just wondered if somebody
All div's are activated instead of one
I have this code and it starts running when I load the page and when I click the link it opens an popup. My popups are filled with an mail script. When the page is loaded all mails are send before I click on the link to show the popup. $(document).ready(function() { //When you click on a link with class of poplight and the href starts with a # $('a.poplight[href^=#]').live('click', function() { var popID = $(this).attr('rel'); //Get Popup Name var popURL = $(this).attr('href'); //Get Popup
Just a simple question please HELP!!!!
Hi everyone, Please see the code below, I don't know why I can't pass i to image:eq(i); I had a few test already, the results were: alert(i), it gives me a number, alert($("#slider img:eq(i)"));, It gives me a [object object] alert($("#slider img:eq(i)").attr("alt")); It gives me [undefined] :( function setCurrent(i){ i = parseInt(i)+1; alert($("#slider img:eq(i)").attr("alt")); }; Thanks!!!!
Background-position animation problem
Hi, I've used the jquery.bgpos.js script to animate on mouseOver a link background-image position, normally it's supposed to create a slide effect When I put this script in a new page, it works! >> http://dirtyballet.com/TESTING/hover.html, The same script in another page, it doesn't work anymore :$ >> http://dirtyballet.com/TESTING/index-home.html, on my first box (photos/videos) the background-position animation doesn't work as expected. I suppose there's another script in my page that interferes
Next Page