addClass function / multiple "div" . please help
Hello friends (ºº)/ How the addClass function is used when multiple "div" and you only want to modify one? ... For example "background-moon" <div class="background-sky"></div> <div class="background-star"></div> <div class="background-sun"></div> <div class="background-star03"></div> <div class="background-moon"></div> <== this <div class="background-site"></div> Thanks for the help
Object Does Not Support Error
Using below code and it is giving error that click event does not support..Please suggest <asp:Button runat="server" ID="Btn_Submit" CssClass="btn btn-primary" Text=" Submit " Width="100" /> <script type="text/javascript"> $(function () { var FU_Solution_Document = jQuery.trim($("#FU_Solution_Document").val()); var Txt_Client_Name = jQuery.trim($("#Txt_Client_Name").val()); var FU_Business_Case = jQuery.trim($("#FU_Business_Case").val()); var
Using Jquery calendars to show database results.
Is it possible to use jquery calendars to show a date range in an Access database record. I want to to show when a resourse is booked out graphically. i.e. Name, start, finish Currently as ASP page shows it in Text format but I would like to show it on a calendar as booked .between start and finish.perhaps by changing the colour of the day on the calendar Thanks for you help, even if its "no sorry" you cant do that. Possible?
Newbie to ajax Need help
I am learning by creating a sample application. As part of it I have used a sample of php pdo crud which I adapted to my sample. I want a code for the following. when I click create in the crud opens a modal form. All these are ok. What I need is the code where In the form, I need to accept a value using a bootstrap select. For example when I select north south east and west in a select it should display the branch address in anther select form element from a mysql table which has branches in north
Filter with an dropdown function, how?
Hi! I have try to change the code in the link below. It is an filter with buttons in Jquery. I want to use an dropdown function with options, not buttons. I try to change the HTML code, but it doesn't work. Who can help me to change the code? I'm totally new with Jquery. Thank you! Huib Link: http://codepen.io/terf/post/jquery-filter-divs
Is there anybody to explain how this code works?
Hello everyone, I am new to Jquery and I need some helps in understanding below codes.(Below codes are part of mind map codes developed by Kenneth Kufluk.) var root = $('body>ul>li').get(0).mynode = $('body').addRootNode($('body>ul>li>a').text(), { href:'/', url:'/', onclick:function(node) { //onclick is a function $(node.obj.activeNode.content).each(function() { this.hide(); }); } } ); So, basically I have three questions regarding the codes. 1.
Too many requests to server with jQuery, how to reduce?
Hi, I am very new to Javascript & jQuery, but I have managed to put the following script together which works, <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script> $( "button" ).click(function() { var pn = $(".pn").text(); $( "td.pn" ).each(function() { $(this).next().load("data.asp?prodref="+($(this).text())) }); }); </script> My issue is that the above script will make several requests to the server (repeating table so number will vary),
Dynamic form elements
I’m working on a web page with a form and I need to apply conditional logic to the form so that when a selection is chosen from a dropdown an action or change is applied to the form. I’ve found some examples through Google searches but it seems most of them make the action linked to a button rather than the selection of an item in a dropdown form item. Can anyone help me with this? Either an example of the code or point me to an explanation / tutorial with examples. Thank you to for your time
Clean URL from anchors
Hi there, I'm completely new in jquery (and this is my first post here). I'm using anchors on a website and I am keeping the #nameoftheanchor after the URL. I'm using this code for a "To top" animation link: $(function(){ $.easing.def = "easeOutExpo"; $(window).scroll(function(){ if ($(this).scrollTop() > 100) { $('.scrollToTop').fadeIn(); } else { $('.scrollToTop').fadeOut(); } }); $('.scrollToTop').click(function(){ $('html, body').animate({scrollTop : 0},1000); return false; }); }); The thing
Open table with same data-href
I have a page with clickable tables with a ID as data-href. Now I want to open another table with the same data-href value when this is clicked. How to do this? For example: <table class='waroverzicht' data-href='15'> <tr> <td> [18-11-2015] </td> <td> DenHaag Outlawz </td> <td> - </td> <td> Devil Attackers </td> </tr> <tr> <td> </td> <td> 65 <img src="images/ster.png"/> </td> <td> </td> <td> 52 <img src="images/ster.png"/> </td> </tr> <tr> <td> </td> <td> 88.68 %
Display Image dimensions before loading the image
Dear Sir I am using following jquery to display an image before loading it Its working perfectly well I tried but getting the values of Image's Width and Height Before loading the same However I am getting its value as undefined Pls help //my code for getting height , width var filesize=this.files[0].size/1024 ; var width = this.files[0].width; var height= this.files[0].height; alert('Height'+height+' Width='+width); // <script type="text/javascript"> $(document).ready(function() { $('#image1').bind('change',
download csv In safari not working any solution.
<script> var convertedCsv = "name,Designation,City,State,email,mobileNumber,roleType,signUpDate+\n" + "A,B,C,D,F,G,I,J \n" + "A1,B1,C1,D1,F1,G1,I1,J1"; var data = new Blob([convertedCsv], {type: 'text/csv'}); var csvFile = window.URL.createObjectURL(data); window.open(csvFile, "amit"); </script>
Retrieve data from Html Table
Hi there, I hava a form with some input and a table, like this <form id='form'> <label >City</label> <input type='text'> <table> <th>Link</th> <th>Description</> <tboby> <tr> <td>Link1</td> <td>Description 1</td> </tr> <tr> <td>Link2</td> <td>Description 2</td> </tr> <tr> <td>Link3</td> <td>Description 3</td>
input inside cell
Hi there How can I select a input value inside a cell? <table id='mytalbe'> <tr> <td><input class='link' type ='text'></td> <td><input class='description' type ='text'></td> </tr> I have a undefinited number of row. $('#mytable tbody tr').each(function(){ var link = $(this).find("td").find("input").val(); //first test var description = $(this).closest("tr").find('description').text(); //second test
Dropdown menu with javascript disabled
Hi, I have a dropdown menu that opens only if javascript is abled. I would need to be able to open it even when JavaScript is disabled . The html code is as follow: <div class="collapse navbar-collapse" id="navbar-collapse-1" style="margin-top:5px; padding-right:15px;"> <!-- main-menu --> <ul class="nav navbar-nav "> <li class="dropdown mega-menu narrow">
Disable draggable for each element using :lt(3) Selector
Hi, I have the following working code: $stock.click(function () { $waste.append($stock.children('.container:lt(3)').card('upturn').droppable('disable').css( "left", function(i) {return ["0rem", "2rem", "4rem"][i];}) ); //3 divs }); This code adds several classes to 3 div's, except the for the css. Each div gets a different left property using: .css( "left", function(i) {return ["0rem", "2rem", "4rem"][i];}) This all works, but I also want to disable the draggable option for the first 2 div's. I've
Using $(this > "img")
For a little game I want to blacken the border of an image within a particular div: myPictureID = "#" + $( this ).attr( "id" ); if (myPictureID == "#t0"){ $("img").css({"border-color":"#000000"}) } Because there are more #t0 divs, I only want to make the border of the clicked div black. $(this > "img").css({"border-color":"#000000"}) doesn't work. How should I solve this?
Problem with .load method. Freezes browser.
Hello everyone. Please forgive my lack of knowledge, I'm just learning basis of jquery. Here is my problem: I'm creating a website which is consisted of many links to subpages. I've decided to use .load method to load my subpages into the main div. I've learned from the Internet how this method should look like in practice and so I got jquery script for each and every link on my website. I've made it this way: $("#kol1").click(function(event){ $('.content').css({"border-color":"#00a0b0"});
Update span content with php response on submit
Hi, I am really new with jQuery, I read a lot of tutorials and documentation, but still I don't get it I have a simple HTML table: Product Quantity Location Action 2TB SATA Western Digital 32 IS102 480GB SSD Samsung 19 IS020 16GB 10600R 12 IS100 8GB 8500U 3 ISO100 32GB 8500U 21 ISO100 4GB 8500U 4 ISO100 When an amount is filled in in the text field and the button Sell is clicked, I want that the following happens: - updateAmount.php must be run, it will or return the text error or it will return
Accordion open when javascript disabled
Hi, i need toggle elements are opened when javascript is disabled and closed when javascript is enabled. Is it possible? This is my example html code: <div class="panel-group collapse-style-2" id="accordion-2"> <div class="panel panel-default" data-animation-effect="zoomIn" data-effect-delay="0"> <div class="panel-heading"> <h2 class="panel-title"> <a
Newbie Login Form Question
Hi Guys, I have just copied a jQuery script and I am trying to understand and edit it. In part it works but I am unable to change a few things and would like help. This is my first JQuery attempt so go easy :-) The basics is a username/password login form. The jQuery checks to see if the input is not blank and if so displays an error message inside the input elements in red. If non empty then a php script is called to check a database for the username/password. The php sets a variable depending on
Not sure if this is jQuery or not, but can you help or point me in the right direction?
Hi, So I work for a company called Force Four, and I work in the studio. We outsourced our site a few years ago to be re done, and now we would like to update a few bits, but without the budget to outsource. I have been asked to work on updating the site. One of the jobs is to make the slider at the top of our site more interactive (see www.f4group.com ). At the moment the slider works when the user hovers over each category, and each category expands. What we would like is the animation to happen
Formatting the width of my datatable using jquery
I'm a novice but I am trying to figure this out. What I have is a datatable on my webpage and I also have column right data. The column right appears to have ample room down the right side of the page. However, when the column right data becomes longer, it pushes the table down the page. Almost as if the table is taking up space in the right column that I cannot see. All of the other data on the left side of the page stays in place. I am probably missing something in the .css. I am almost sure
jQuery POST vs GET (problem) in Apache Cordova
Hi to all, Firstly I´d like to apologize for my English if it is not correct. I have a problem passing variable from jQuery POST method to my PHP file. I am coding in Apache Cordova for Android. I have this function in JS file: //.....deletes clicked invitation .......... // function invitation_delete() { $(document.body).on( 'tap', '.events_pinned_invitations_button_delete', function () { console.log("ok"); var invitation_id = ($(this)).data("invitation_id"); console.log(invitation_id);
I-Frame and JQuery - help please
Hi All, I have an I-frame and a JQuery code. The problem is I don't know how to put them both together in an html code for a word press site. Here is the I-Frame: <iframe frameborder="0" scrolling="no" src="https://www.turk.travel/frameSale.aspx?agent=75562d3d-c6c0-4173-b590-7f01dc75f4d2&frameSaleType=123&width=960&height=371&langID=1055" style="width:977px;height:525px;" ></iframe> Here is the JQuery code - <script type="text/javascript"> $(function() { var search = window.location.search;
how to store a web component , thats dynamic in nature.
Hey guys , I just have a really important question to ask , i am really found of design and everytime i see a great design , i can't help but press the print screen button , so suppose i like a navbar or say even a button , i would just take a screen shot and save it . But now what if that element is a dynamic element , like THIS (see the last item , the facebook button) , now the essence of that element is in the fact that it flips , so if i just take a screenshot its really hard for me to recollect
What am I missing? Linking image to page.
Hey! Okay, so I'm using jQuery and VERY new to it all. If you look at this test page , you won't get confused... Try to stay with me, here! I want those images to pop up exactly like they are, however, I want to be able to click on the image again once it pops up and it bring me to another page. What code would I need and where would I need to put it? I was trying to test the last image and as you can see, failed miserably!
decimal error
i need two digits after decimal point <table> <thead> <tr> <td>Qty</td> <td>Price</td> <td>Amount</td> </tr> </thead> <tbody> <tr> <td><input type="text" class="qty"/></td> <td><input type="text" class="price"/></td> <td><b class="amt"></b></td> </tr> <tr> <td><input type="text" class="qty"/></td> <td><input type="text" class="price"/></td> <td><b class="amt"></b></td> </tr> </tbody> <tfoot> <tr> <td>Expanse</td> <td>Outstanding</td> <td>Paid</td> </tr> <tr> <td><input type="text" class="expanse"/></td>
after changing color using jquery, mouse hover effect is not working
Please refer http://beforeafterretouchers.com/ when i click menu on top, the clicked men is brightens and concern text / images are filled up no issues here top Menu text changes color (bright #ccc to #fff) however when I click printing on left hand side circle, i am executing command $('.menu').css('color','#ccc'); so as to normalise the brighten menu and now when I mouse hover the top menu , there is no mouse hover effect. how to resolve this yes i want mouse hover effect
Searching for solution / plugin
Hi All, new here so have to cut me some slack I am currently working on a site using bootstrap - pretty easy straight forward build as i am still getting use to the ins and out of BS. Here is what i am looking to do and was wondering if it was easy with BS/jquery. I have a 2 column site, one column has an image the other column has a bunch of links to PDF's. Left column will be an image (450px) wide. Right column will be a list of links that go to PDF or zip files. When the viewer rollovers on one
XHR failed loading: POST
I am using Ajax to call a servlet which return a String message. The servlet gets called successfully as I can see some println statements in my console. But after that i get an error XHR failed loading: POST. The code is - xhttp.onreadystatechange = function() { if (xhttp.readyState == 4 && xhttp.status == 200) { var result = xhttp.responseText; deleteItemsIDsResult(result); } }; xhttp.open("POST", "ItemsIDsDelServlet", true); xhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
jquery animate direction
I'm trying to change the direction using the following code. It's set up to animate left to right. http://jsfiddle.net/xj8chem9/ Any help would be greatly appreciated to change the animation to right to left. I've tried several ways all to no avail.
access dynamically generated elements
I have text boxes and a button that will be generate from a php loop jQuery dropdown box example jQuery dropdown box example SELECT YOUR CITY NEXT NEXT NEXT NEXT i want that if i type any thing in any textbox and click on next..next all textboxes should be filled by that value
Uncaught ReferenceError: $ul is not defined
Hi I am using jquery file in my asp.net mvc5 project nut i get error . and error says there is problem in the line number 135 $('.filter-a select, .product-a > *:first-child form ul li select, .table-a select, .tabs-b select').parent().jNice();
jQuery and HTML Comments
Hello, I am new to jQuery, and I noticed a problem in the way it renders HTML comments. For example, if I open the following HTML file in a web browser: <html> <head> <title>jQuery Test</title> <script type="text/javascript" src="jquery-1.11.3.min"></script> </head> <body> <h1 id="htmlWithComment" <!-- onclick="alert('Commented HTML was clicked.');"-->>HTML with Comment</h1> </body> </html> The text inside the <h1> tag gets rendered, but is preceded by a greater
Reverse lazy loading in JQuery add delay before scroll top detection
Hello, I am trying to create a reverse lazy loading in JQuery for Drupal 7, That means that instead of adding items when the scroll reaches the bottom of the page, I want to add items when the scroll hits the top of the page. This is useful to display past events in a event list. So far, the script works well except for a bug that I can't resolve. If the user keeps on scrolling its wheel, items will keep on being added. I want to be able to show one item, then stop the scrolling detection for a few
event.preventDefault Code not working in firefox 41.0.2
Following code is not working in firefox 41.0.2Code is working in chrome Jquery code page linkhttp://api.jquery.com/event.preventDefault/ <div id="log"></div> <script> $( "a" ).click(function( event ) { event.preventDefault(); $( "<div>" ) .append( "default " + event.type + " prevented" ) .appendTo( "#log" ); }); </script>
positionLeft = $(this).css('left'); returns pixels instead of rem
Hi, I have the a div with following CSS: style =" z-index: 3; left: 12rem; With jQuery I want to grab the left value. I am using this code for it: positionLeft = $(this).css('left'); But this returns the pixel value (144px) instead of the original 12rem What can I do to get the 12rem instead of the 144px I get returned now? Thanks
How to store map tiles locally using openlayers
I just picked up a piece of code from the openlayers3 examples see HERE, now everytime you click the "geolocate me" button the tiles of the map are reloaded , now is there anyway for the tiles of the map to be stored locally ? I.E. when i click on the "geolocate me!" button the 2nd time around the tiles sould be loaded from the users browser locally, rather than being fetched from the internet. The code for generating the map is as following: var map = new ol.Map({ layers: [ new ol.layer.Tile({
How to differentiate localStorage from storing each file on click?
I've made a simple jQuery script which stores values "voted1", "voted2", "voted3" in localStorage. The problem is that on click it stores all values at the same time, and I need it per click as it should be later called (e.g. if "value3" exists begin jQuery logic...) I can't figure this out, after weeks of testing.. HTML: [gallery link="none" size="medium" ids="102,13,27,25,23,15" orderby="rand"] <div class="exists" style="display: none;">Thank you for voting!</div> CSS: .gallery-item a { background-color:
Next Page