Managing optional lines of HTML
Now that I have a global variable that tracks clicking an anchor (see https://forum.jquery.com/topic/global-click-variables), I have a set of HTML lines that need to be included or removed depending upon the state of the flip/flop. In one case .html("") and in the other .html("some html text"). The html text is created by successive concatenations to a string but this gets rather messy. Is there a way to include or skip normal looking lines of html leaving them easier to edit? Here's what I have
functions with jquery animations, wait till one finsihes before the other starts
the animation works perfectly if you open and close the same tab, but as soon as u start clicking on other tabs it bugs up a little this is because when u click on another tab, it closes the current one if i can make the opening tab wait until the current tab closes, i think the bug will be fixed, but i don't know how to do that the javascript is at the bottom of the page http://patrickallard.net63.net/ and ill post it here for convenience sake [CODE] <script> //page dimentions var tabWidth=300;
Replace apps browser message "page not found"
Is there a method whereby I can get my HTML5 jquery phonegap app to not show the default "page not found" when the link to the server fails. I need to handle it myself and my message works fine but is immediately followed by the default "page not found" message, which I do not want. How do I stop it?
FadeIn a value from a hidden input once it is set.
One of the things this code does is to set the value of a hidden input, #selectionveg1, and sets the text to be displayed via <span id="spanselectionXXX>. I would like to fade in and out the text when it changes. I tried using .fadeIn and .change, but I don't think the span element is right for this. Any suggestions? $("body").on('click', '.yes31', function() { var parent = $(this).parent(); var gpar = parent.parent() gpar.addClass('opt31selected'); var thing = gpar.attr('id');
(window).load or (document).ready to initiate page?
I've been working on a page, with help from people here, and learning jquery. One of the things the jquery script does is to display a sum (a dollar value) of options selected. There is a starting cost for the item, and the options selected change the final cost. So, when the page loads, it will display a dollar value of like $5.00. Initial value and option values are stored in hidden inputs, which I didn't include here. jQuery(function($) { $.fn.total = function() { var sum
Back button is pressed on browser without plugin
I have a website that has multiple containers with titles. When you click on the titles it hides the rest of the containers and then goes to the same page but with a hash tag. Then when you click the back button it goes to the page without the hash tag though the jquery is still in effect with the hidden containers is there a way to reload that page so that the jquery is reset that doesn't use a plugin?
JQuery Access-Control-Allow-Origin Issue
How do I get rid of the following error message XMLHttpRequest cannot load http://api.sba.gov/geodata/all_links_for_city_of/Evansville/IN.json. Origin null is not allowed by Access-Control-Allow-Origin. Here is my html file <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <title>County Lookup</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <script
HTML5 doctype and my smoothscrolling doesn't work anymore !
Hello, For my vertical website, I used to code in HTML4 Transitional and put a little script in order to smoothscroll through anchors : $(document).ready(function(){ $('a').click(function(){ var id = $(this).attr('href'); scrollTo(id); return false; }); function scrollTo(target){ if($(target).length>=1){ width=$(target).offset().top-130; } $('body').animate({scrollTop:width}, 1000); return false; } }); All of this was working before I switch to HTML5. Now,
passing variables into a function
there are two ways a fucntion can be called in responce to an event $(this).click(function(){}) and $(this).click(sam()) function sam() {} using the second one if i want to give it the text string "ginger" as a variable i would do this var text = "ginger"; $(this).click(sam(text)) function sam("varone") {} How would i do this when using the first method of calling a function? UPDATE the second example does not work if i try to pass in any variables, it has to be $(this).click(sam); not $(this).click(sam(variable))
Wait until image is loaded
Hi, i need some help here, I need my code to execute something BEFORE image is loaded, but I dont know how :(
Differentiating Checkboxes and Labels with the Same Identifier
Hi. We have some HTML code that was created in APEX, and this code uses the same identifer, at least in terms of name, for a checkbox and its adjacent "label for" element. We have to dynamically append an input box next to these elements, and the initial state of these input boxes must be DISABLED. The issue is that when a user clicks just on the input box, the checkbox gets checked. With the state of the input box not DISABLED or READONLY, this doesn't happen. It's as though when the DISABLED
error using tabs in jquery
Recently I was given a website that used jquery libraries. They were local, so I replaced them by libraries from ajax.googleapis. I think that part worked, The idea was to get a scroller to work, where the scroller was made from a set of tabs. The libraries are: <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js" type="text/javascript"></script> <script
Select alt tag of clicked image
I am using jQuery(this).text() to select text Now, I want to select clicked image alt tag. By using this jQuery(this).find('img').attr('alt') I am not able to select alt tag? Can you please help me?
The Big Question I Have About jQuery (In the Post)
Before I go and ask my question, I would like you to read the following: To start of, I'm 15, so if I don't know what I'm talking about somewhere (or you think I don't), you may be correct. I would also like to say that I think that jQuery, Sizzle, etc. are great tools in JavaScript programming, and in no way do I wish to hurt anybody's feelings or try to infringe upon opinions. Now for the topic at hand... With modern desktop web browsers as well as the mobile ones starting to support more and more
jquery box or columns resize
He I trying get this code to work with IE9 It works in IE 10, chrome and firefox Having problems with IE9 and I am not getting an error code. $('.row').has('.columns:nth-child(2)').each(function () { var $boxes = $(this).children('.columns').children('.box'); $boxes.css('height','auto'); if (window.innerWidth > 768) { var maxHeight = 0; $boxes.each(function () {
Failure wiring change event handler through calculated css class
I have a lot of textboxes in an html table. They have the same class name if they are in the same column. But they have different class name from textboxes in other columns. So like this: textboxes in column 1 has class Column1TextBox textboxes in column 2 has class Column2TextBox textboxes in column 3 has class Column3TextBox I need to wire change event handler to each of these textboxes. So, I attempted to do it like so: for (var i=1; i<$('table>th').length + 1; i++) { $('input.Column'
iPad jumps to the left when last menu item on right is press.
I am having a problem with the iPad version of website. When I press the last menu item to my right the ipad my page content move to the left then go back to normal. The website url is http://www.darbysdestinations.com, you must be on an iPad to see this happen. I have tried the web simulator does not work. If you click on the about us you will see the problem
.css("white-space", "nowrap") not working
Hello, Im trying to prevent text in an ui-accordion from wrapping. But, I cant get it to work. Ant suggestions ...
Show/Hide Click Event for touch devices for TWO sub menus.
I have a Navigation where two of the menu items have a dropdown sub-menus. At the moment my jQuery you can click on these and toggle between the two to show them but i cant get them to click again and hide (they stay shown). What am i missing? On my desktop functions you see i can use the hover state if else to make this work. http://jsfiddle.net/LPrMy/3/ I have also tried .toggle and no use! :(
fixed scrolling speed
Is it possible to make a web page scroll at a set speed.. So that no matter how fast you scroll, the page will still go down (or up) at the speed i want it to..? Thanks in advance
jquery.ajax({cache:false}) - why not use HTTP Cache-Control?
Does anyone have any insight on why jQuery uses the timestamp query param trick, instead of sending "Cache-Control: no-cache" HTTP header, when making an AJAX request with the cache:false option ? I'm interested in the historical/official reason, but feel free to speculate on why you would think of doing the same. Thank you *curiousity killed the cat*
Retain css of aready clicked element
Dear All Please refer http://jsfiddle.net/HpsdF/ In this script I had made following provision On mouse hover the class is changes and On click the class is changed However we want to retain the class of cell which is already clicked Let us assume we click on 1st column.. the class of the cell is changed. when i move cursor to another cell, the class of the 1st cell is changed to normal. How do i retain the the class of cell till another cell is clicked However on mouse over the class / will be
Adding dynamic row to list
Hello, I m try to add row to <ul> with list of rows after page load, but when the row added, its looks different than the outers, why ? what can I do to fix row for look the same has the others ? this is my example : http://jsbin.com/ebenov/1/edit here is my html code : <!DOCTYPE html> <html> <head> <link href="http://code.jquery.com/mobile/latest/jquery.mobile.css" rel="stylesheet" type="text/css" /> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script src="http://code.jquery.com/mobile/latest/jquery.mobile.js"></script>
Autocomplte/aJax-java help
Hi, I am new to jQuery and trying to use autocomplete widget with ajax call to database. I am able to call database, returned ArrayList of string value, and converted the response as json object using org.codehaus.jackson.map.ObjectMapper( Do I need to use something else?). When i put an altar, I can see results as pure strings with comma delimiter, but not able to see a suggestion list with auto complete. Could someone take a look and suggest me how to correct it. Appreciate your help. Thanks!
view jquery animation only in desktop-mode
hy i have realized an animation using jquery. i want to view this animation only in desktop-mode . When my web page is on smartphone or tablet i don't want to view the animation. Can you help me? This is my animation: $(document).ready(function() { $(".boxOfferta").hover(function() { $(".m", this).toggle(300, "swing"); }); });
page is navigating if i clicks Cancel button.
jQuery(window).unload(function () { var yes=confirm("You are about to leave this page.Please make sure you have saved your changes."); if (yes){ return true; } else { return false; } }); Hi Sir, i am trying to populate this message if user is trying to navigate to other screen. but if i clicks cancel still it is navigating to other page. Please help me what i should do to stop the user to navigate to other page. Thanks in advance Amit
Same php code to display results in different divs
Need help on how to use the same code and display in different divs. What I want to be able to do is have the user chose to start the display by either ORG, DIR, MGR, COACH or EMP. From that starting point the user can drill down to the next level or do a sub report or see the tickets at that level. I use the same php code to query the database depending on the level that is chosen. An example would be for the user to chose MGR from the query screen. It would display all the MGRs and then the
HTML Anchor speed & hide attribute
How can i setup HTML anchor speed? It is possible to hide the id, for example if i click on a anchor, i don't want to see www.mypage.com/#contact_box =
different background images in menu stay inactive/active while content is also dynamic jquery
Hi, I´m searching so long for a problem which surely doesn´t appear for the first time. I have different background-images in my nav which appear when hovered and activated. Can someone please help me? Thanx!! http://jsfiddle.net/ErikP/MNDTb/13/
Jquery Dialog
HI so I am trying to make a dialog come up when a particular button is pressed on my web page but my code is not working. What is odd is that when I change the property of autoopen to true the dialog comes up on load and the code works fine... (Code is underneath). Also do I need to change the display property of the div to none? #WarrantyAddDiv - is the div containg a table in it and I want that table to appear in the dialog once button is pressed #btnAddAssetWarrantyInfo - is the button used $(document).ready(function
Compare two values on button click.
I have two dropdown boxes that have a few items in them. I need to check the value of each box when my search button is clicked and show specific html when it matches two values. Here is my code on jFiddle: http://jsfiddle.net/maddtechwf/9jPqf/
Change DIV on changing drop down using jQuery
Hi, I am new to jQuery. I tried to use the following code in my site but it’s not working. Please help me . Thanks in advance Raj<!DOCTYPE HTML> <head> <meta http-equiv="content-type" content="text/html" /> <style> .box{ display:block; padding: 15px; border: 1px solid #ddd; background: #eee; width: 100px; height: 100px; margin: 10px; } #selectField{ border: 1px solid #ddd; width: 200px; }</style>
jQuery listview XML parsing recursively
I'm new to jquery, need help in parsing the below XML for jquery listview.. Thanks a million in advance. <categories> <category> <title name="main">Main title1</title> <subcategory> <title name="submain">Sub title1</title> <section> <title>section 1</title> <description></description> <link favorite="true"> <text></text> <url>/</url> <description></description>
TypeError: $upwards.SeydoggySlideshow is not a function
Not sure exactly what my problem is. Could someone help? Website Link
dialog z-index
jquery UI 1.10.. z-index is removed, now my dialog does not appear on top of other modal windows , please advice what is the work around to make it appear on top. Thnaks
Execute function
This is what I would like to achieve: http://jsfiddle.net/Kp8rs/2/ However, with the exact same code I can't get it to work on: http://www.musol.org.bo/mujeres/viudas-y-esposas-de-peones/mujeres-del-cerro.html It looks like $('.csc-menu li').each(function(){ is never being executed. Any ideas on why and how to solve this problem? Many thanks, Bernhard
JS 101:How to turn off visible?
Hello, Im again bothered by the most insignificant of elements that I cant figure out how to complete. Im wanting top make a button invisible or visible:false. How can I do that?
AUTO COMPLETION IN A USER INTERFACE
DEAR FRIENDS, i want to use auto completion, auto correction and spell checks in my project user interface , can any one suggest me , how i can develope it .
Global Click Variables
Is there a way to have a global variable that survives multiple click functions? As a test, the following does not seem to work: <script language="JavaScript"> $(document).ready(function() { alert("ready"); var GPSloc = 0; $("#FlipLoc").click(function(e) { alert("GPSloc="+GPSloc); if (GPSloc==0) { GPSloc = 1; } else { GPSloc = 0; } alert("gpsLOC="+GPSloc); }); }); </script> FlipLoc is a standard HTML anchor but the value for GPSloc does not change across invocations.
Removing linked text while using Jquery script
I am using a tool in php to write some HTML code for me and I stuck this chunk in there so that it could write me a footer with my company's information. It seems to work fine EXCEPT the links for www.company.com is include in "|Send Feedback" and the links for docfeedback_@company.com are included in "|See:". How can I fix this so "|Send Feedback" and "|See:" are just plain text and not included as links!? Thank you so much! What i have noticed is that the source code of my html file does not show
Next Page