Running an if else statement which changes the text on the button when it is clicked
Hello, I am developing a dropdown box which is open and closed with a button and I would like the button to change the text from open to shut when it is clicked. I have written the code to do so but the problem is that the code doesn't start executing until the second click which causes the text to be the opposite of what i want it to be. Here is the code I have so far. You can also check out it in action at https://googledrive.com/host/0B0ATHPRjoZ2ZWFhxaDJvNHN4blU/ (For some reason Google Drive
make $.get('url') work in IE 6
My plugin uses $.get('url') , this is not working in IE 6 . Please advice how to make ti work in IE 6. Its working in IE 8 but not in IE 6 .Please help me.
jquery dialog plus browser blink
I am using inactivity timer plugin to log out when inactive. This plugin puts a dialog with message you session will logout soon. I also want to blink the browser so that users knows this tab or windows has a message ? Please advice. (function($){ $.fn.idleTimeout = function(options) { var defaults = { inactivity: 1200000, //20 Minutes noconfirm: 10000, //10 Seconds sessionAlive: 30000, //10 Minutes redirect_url: '/my/app/inactivitySignOut', click_reset:
Fault inside JQuery 1.9.1 in IE9
I have a web application which has jQuery loaded, but does some manipulation of DOM objects directly. When upgrading to 1.9.1, this application causes jQuery to fault when run inside IE9 in Quirks mode. At line 2627 of 1.9.1, the code involved is: // href/src property should get the full normalized URL (#10299/#12915) jQuery.each([ "href", "src" ], function( i, name ) { jQuery.propHooks[ name ] = { get: function (elem) { return elem.getAttribute( name, 4 ); } }; });The "getAttribute"
how to pause the script in content when call $(dom).html(content)
I have impl such function. function swapElementContent(el1, el2) { var tempContent = el1.html(); el1.html(el2.html()); el2.html(tempContent); } it works, however, the scirpt in el1 & el2 will be executed! that has some side effects. so is there any ways to void the script be executed? or is there any other impl to avoid it. I am tring to impl with inner html, however, it may have cross browser problem?
Selecting tr td elements in a table based on the hr element
I'm trying to select tr td elements so I can use each to loop though. I have multiple tables in the document that don't have a way to be identified other than using the tr th information. Example - I'm trying the select all the tr td elements where th = header1 <body> <table class="table1"> <tbody> <tr class="headers"> <th>header1</th> <th>header2</th> </tr> <tr><td>data1</td><td>data2</td></tr> <tr><td>data3</td><td>data4</td></tr>
Office mapping option/tool?
Hello, Not sure if this is the right place for this, but I'm looking for a solution for office mapping/seating that will be visible on the web. I'm looked at some other JS/jQuery tools like JQVMAP & JVectorMap, but sadly it looks like those are mainly for world/country maps. I'd like something to the effect of different office floors, with office locations for employees. Then, when you rollover the office, it pops up with a name/number/whatever. Anyone know if something like this can be done, or
Invalid character error
I have included the file jquery-1.8.1.js in a visual studio 2010 project. I am creating a windows phone app using phonegap framework. However, I get the following error: Error:"Invalid character file:x-wmapp1:/app/www/js/jquery.mobile-1.2.0/jquery-1.8.1.js Line:974" The code on line 974 is: for ( ; list && firingIndex < firingLength; firingIndex++ ) { if( (list[firingIndex].apply(data[0],data[1]) == false ) && options.stopOnFalse ) { memory = false; // To prevent further calls using
Update class name in duplicate html tags
Hello All, I have 2 div shown in below with same id, <div id="dv1" class="oldClass">Div 1</div> <div id="dv1" class="oldClass">Div 2</div> I need add class attribute using java script and i had implemented shown in below, var lstObj = document.getElementsByClassName(“oldClass”); for (var i = 0; i < lstObj.length; i++) { jQuery("#" + lstObj[i].id).addClass("highlight"); } but every time assign in only 1st div shown in below, <div id="dv1" class="oldClass highlight">Div 1</div> <div id="dv1" class="oldClass">Div
Grab top position on scroll
Hi there, im trying to get the top position of an element every time the user scrolls getting always the same result, wich is not what i want ! you ca see a live example here: http://www.artolica.com/version1/photoshoots.html Thanks in advice!
Import data-* from local HTML file
Hello I developped during my spare time a FanSite. I want to add a Profiling functionality, using Save and Load buttons. Load button is an <input type=file />. Save button produce a simplified report into a blank page so user can right-clik > Save As... into his local drive. This file so contains all pertinent data-* attribute user used. Note nothing goes to the server, everything is client-side. Now my problem is how to implement the method $("#LoadButton").change() so it stores back all the html
hover/mouseover prob with Chrome...
I'm adding a feature to my photo site, that when you mouse over photo you see an arrow on top of the photo.. left part of the photo goes back, right side goes forward (yes, I'm doing a little bit what FB does...;-) now when you mouseover the photo and keep clicking the photo, the mouse is on the photo when you land on the page, yes? so in FF when you land -- if the mouse is on the photo -- you see the arrows onLoad, but not on Chrome, on Chrome you have to move the mouse before you see the arrow
want to know how to do looping in query
Hi, Below is the scenario: <div4 class="abc"> <div1 class="clickMeTalkNow"> </div> </div> <div5 class="talkNowOptions"> <div2 class="clickMeTalkNow"> </div> </div> <div6 class="talkNowOptions"> <div3 class="clickMeTalkNow"> </div> </div> on click of div1, div5 should open, on click of div2 ,div6 should open. something like this should be done. But i am nt getting exact way: should each() be used? $(".clickMeTalkNow").click(function(){ $(this).closest('.closed').hide();
ajax + embeded javascripts
If you use AJAX to fetch a document which has JavaScript in it and insert it into an element on your page will the JavaScript run in the following 3 situations. 1) if it is written into the downloaded content so that it would run if the content was accessed as its own page? (IE a script which runs when the page is loaded) 2) if it is written as a function and the code which executes the function is outside of the AJAX content (ie you have an event handler or a HTML element with an event parameter
Ajuda Aqui!
Olá pessoal, Gostaria de saber se é possivel fazer o seguinte: eu tenho uma variavel no meu script: var numero = '4'. Então gostaria de saber se é possivel eu criar sertas quantidades de divs, por exemplo, se a variavel acima (numero) for igual a 10 então o script vai criar 10 divs, se for igual a 40 então vai criar 40 divs, e assim por diante, entenderam? Como faço iso??? Abraços.
URL Problem between Browsers
Hi ppl, I have the following code: var folder_depth = './'; var browserName = navigator.appName; if (browserName == 'Microsoft Internet Explorer') {folder_depth = '../../';} var url = folder_depth + 'admin/useraccess/userslist.php'; window.location = url; I had to do a browser check because else the on IE9 the page would try to redirect to http://localhost:8080/aaron/admin/useraccess/admin/useraccess/userslist.php (does not work) whilst on other browsers like Chrome it
jQuery on huge frontend overflows vs. Angular JS
I've got some serious issues. We started to create a project with very strong and huge frontend. It means that on that frontend is a lot of nested modals, in every modal is a lot of triggers and.. I think that I've reached level where it's not possible to continue in using jQuery. I've got basic HTML with about 30 triggers on some buttons. One of that button on click shows another modal window. I've got that #modalDiv nested in previous form and it's empty. I load remoted content. I've got two basic
Hover or disjointed rollover?
Hi there, I'm working on a simple page where I have 2 images fading up using jQuery. That's working all right. Now I want to add something to that. On 1 of the 2 images I want to add a hover effect that will reveal another image somewhere on the page. What's the best script to achieve that? TIA!
jQuery load function does not work properly on chrome and safari (Windows)
Hi, When I load a page with jQuery load() function API. It does not load the style section on the header using Safari and Chrome.
how to read below json format data in javascript/jquery function
how to read all JSON data either loop or recursion function please give me function which read this JSON data. Thanx jQuery1710695295648416637_1362076785226({ "data": [ { "userLogin": "amit", "text": "1\n", "next": [ { "userLogin": "amit", "text": "1.1\n", "next": [ { "userLogin": "amit", "text": "1.2\n", "next": [ { "userLogin":
how to export html web page (include image) to excel file?
how to export html web page ( include image ) to excel file
I have issue with clone()
my problem script :) (http://jsfiddle.net/qurbonov/pJgyu/28501/) inside "p" created clones "showHide", functiondoes not working
Is it because of JQuery that this page does not load all images?
Hello; This page does not load all the components all the times! For example images. I have to refresh a few times till I see everything! What could be the problem? Thank you
Slipt video!
Hello, how could split in two while a video is playing? Thanks!
Clash of 2 JQuery functionalities!
Hello; I use 2 Javascript filters to filter the results based on hotel star rating and the price in this page. The checkboxes filters hotels with minimum star rating. The slider on the other hand filter the results based on the price. The both work fine but the problem is when I use the slider it messes with the checkbox and checkboxes dont show correct results anymore! Can anyone help? I am pretty sure I have to change something in the slider function. //Slider Price function showProducts(minPrice,
I can't see why the code doesn't work. About Jquery and checkboxes
Hello; AAAAAHHHH!!! I have been staring at screen for past 2 hours and can't find out why Example A works and Eaxmple B doesn't! This is what they are supposed to do. Thank you. Example A (works): <ul id="filters"> <li> <input type="checkbox" value="categorya" id="filter-categorya" /> <label for="filter-categorya">Category A</label> </li> <li> <input type="checkbox" value="categoryb" id="filter-categoryb" /> <label for="filter-categoryb">Category B</label>
Jquery Ajax to pop3
Hello, Has anyone ever done any work with ajax to a pop3 server? I cant find anything related. Im hoping to develop a helpdesk ticket system. Im looking to download header info and create a screen with email info ... Thanx,
ajuda.............
Olá, gostaria de um código que a cada 1 minuto acontecesse isso: $.get('/profile?mode=editprofile&page_profil=notifications', function(datag){ var numero = $('.main-content:contains("Notificações") tr[class*="row"]', datag).size(); var topic1 = $('.main-content:contains("Notificações") .frm-form', datag).html(); var checa = $('.main-content:contains("Notificações") .frm-form .postdetails', datag); if(checa.length){$('#locv').html('<center><div>'+topic1+'</div><div onclick="window.open(\'/profile?mode=editprofile&page_profil=notifications\',\'_self\')"
Switch between tables hide/show
I am currently doing the below and it works...although I have two buttons.... I want to have ONE button that changes between tables and when it does changes the name on the button Is this possible? How do I combine into one button and then changes the text of the button? Thanks hope you can help.... <script type="text/javascript"> $(function() { $("#TableButton").click(function(){ $('.listRow1').show(3000); $('.listRow2').show(3000); $('.iconRow').hide(); }); $("#IconButton").click(function()
Plugins stops working wehn upgrading from JQuery 1.8.3 to JQuery 1.9.1. Could someone, please, help me out?
Hello, Some time ago I created a Balloon plugin using JQuery 1.8.3. When I updated from JQuery 1.8.3 to JQuery 1.9.1 my plugin stoped working. The balloons do not show anymore. I went back to 1.8.3 and it works. I tried to understand what might be wrong but I can't find it. Could someone, please, help me out? This is my code: (function ($) { $.fn.Balloon = function (options) { var defaults = { balloon: "", class: "Balloon", click: false, id: "Balloon",
ajax xml not loading initially online
Hello. I'm attempting to load data from an external xml file. This is my code that runs at the beginning. ///////////////////////////////// ////Retrieve level information/// ///////////////////////////////// $.get('scripts/level.data.xml', function (d) { $(d).find('Level').each(function () { var $level = $(this); if ($level.attr("Level_Number") == level) { var count = 1; //Cycle through die contents of level $level.find('Die').each(function
Why jQuery removes Margin when showing/hiding the element?
I have an element that has margin-top and border. When I call $(element).show() it doesn't use the element's margin and the it doesn't look good (in original fiddle If you click on the div that is after the input text the slide animate starts from top of the text input and you see a black line passing it and it's not beautiful! I want the animate start form the bottom of the text input.) This is my beta in jsFiddle. but The orginal is diffrent (I remove an element because the wanted element cannot
$(#).css not working
It appears that the script code does not fire for some reason. Any ideas? css .isvisible{ visibility:visible } .notvisible{ visibility:hidden } Html (works) <div id="SectionLink" class=" notvisible"> @Html.Partial("Partial/_SectionDisplay", Model) </div> <script> $(document).ready(function () { $('#P1').change(function () { $("#SectionLink").css("isvisible"); (Does not work) }); }); </script>
Handling custom errors with $.ajax method that are passed back from server?
Hi, I want to pass back and handle a custom error message using the $.ajax method. I think I'm close but I'm stuck on parsing the error. My questions: ------------- 1.) How do I parse the [Exception] section below?. Shows it being returned to client but I was hoping it could be pulled out with a method on the XHR? 2.) Is there a way to set the "textStatus" or "errorThrown" with the custom error and use those on the client? Or are these read-only? On the server (Using ASP.NET) //Test to force
how to set active link highligh in jquery
hi , every one this vamsi i have problem in my project that is i want to highlite the active link ....so please help me as well as posible.. thanks, vamsikrishna
GET vs POST
I always believed that the difference between using GET and POST to submit data was that POST sent it as like an attachment to the HTTP header (like a file attached to an email) and GET put it on the end of the URL and used command characters so separate it from the rest of the URL and to separate key > value pairs. this meant that with GET the data could not contain characters used as command characters such as ? = and & also GET had a data limit. this means that GET can be used to attach data to
Everything is very small (Android/Galaxy S3)
I'm new to jQuery Mobile and I'm having a small problem when viewing a page with my android device. Everything on the page is tiny. I'll just show you an example to avoid further confusion. http://hacknet.se/m/ <html lang="en"> <head> <meta charset="utf-8" /> <title>Demo</title> <!-- Load jQuery Mobile --> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.css" /> <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
jquery hide and show problem
i am working on a project.In which I am displaying the transaction list.and if admin click on any of the row then the row will disappear and a new row with form to update that row will open with cancel button.Here admin can update or cancel .if he can cancel then orginal row will appear and form row will disappear.if i dont click on cancel and click on another row then update form row related to that row will appear and original will disappear.at the same time we can open the form of all form rows
Object dispatcher
Hi there. How can I concat string and create an object??? Like we do in PHP. function createObj($id){ $str = 'controllers_config_' + $id; return new $str(); } $obj = createObj('structures'); How can I do this in Jquery or Javascript ???? I hope I've explained. Thanks
clicking on image should take me to the previous div using query- help needed
Hi, my scenario is like, there is an image in a div: <div class="leftSelect" > <img class="pushToLeft" src="./images/arrow-sched-left-none.png" alt="arrow-sched-left-none.png"/> </div>this image is present in different parent divs with different ids. now i have below scenario: <div1> <div class="leftSelect" > <img class="pushToLeft" src="./images/arrow-sched-left-none.png"alt="arrow-sched-left-none.png"/> </div> </div1>similarly another div: <div2> <div class="leftSelect" > <img class="pushToLeft" src="./images/arrow-sched-left-none.png"alt="arrow-sched-left-none.png"/>
Next Page