Change active hover image src
Can someone please help, cause I don't understand how this cannot work!!??? I am trying to write a small function that would replace a picture src when hovered (see code below) - $(".myimgisthis").hover(function(){ var oldimg = $(".myimgisthis img").attr("src"); var newimg = $(".fiimgi img").attr("src"); $(this).attr("src", newimg); }, function(){ $(this).attr("src", ouimg); }); The reason why I want to use variables and $(this) situations, is because I need this function to work on an PHP output
Help pz send pdf file
I can't send pdf to the database index.php <td> <input type="file" id="fileIMG3" name="fileIMG3" accept="application/pdf" > </td sender.php if(!empty($_FILES['fileIMG3']['type'])){ $target_path3 = $_FILES['fileIMG3']['name']; $valid_extensions3 = array('pdf'); $temporary3 = explode(".", $_FILES["fileIMG3"]["name"]); $file_extension3 = end($temporary3); if((($_FILES["fileIMG3"]["type"] == "img/pdf")) && in_array($file_extension3, $valid_extensions3)){ $target_path3
Hello my friends. I'm trying to understand Ajax. Namely, with the sending data to the server. I have the form
Hello my friends. I'm trying to understand Ajax. Namely, with the sending data to the server. I have the form, and i need to send to db with ajax <form id = "send_form"> <table> <thead id=heading> <tr> <th>Name <th>Age <th>Salary </tr> </thead> <tbody id=records <tr> <td> <div class="col-sm-3"><textarea
Good effect for ecommerce
Goof effects with Jquery for ecommerce? We need a a good ecommerce site but we want to give life with good effects and good transformations
facing problem in send and recieving the dada between jquery pages
i am not able to send data between jquery pages (one is data accepting page and other is process page )and i am using eclipse oxygen do i need to import jquery through script tag or eclipse supports jquery by default.. and my code goes as follows: data accepted like this: $.cometChat.send($(textInput).val()); data is recieved by process page like this (function($){ $.cometChat = { value:undefined, recieve :function(message) {
Best practices on setting values on 10 images
hi guys, I have a main image and 10 thumbnails with hover over effects that are set dynamically. I have only pasted top 5, I also have a 3rd option for hover on effects and wondering if I am on the right path Is the script below ok ? If not, whats best practice ? thanks Ehi $('#Image1').click(function () { $("#canvas").addClass('sepia'); }); $('#Image2').click(function () { $("#canvas").addClass('saturate'); }); $('#Image3').click(function
ready(function()
Please, how do? to read the variable? <!DOCTYPE html> <!-- # test powershell cls # mercredi 28 février 2018 10:53:04 $xtime = ([System.Io.fileinfo]'c:\........html').LastWriteTime $xSec = (new-timespan -start "00:00:00" -end $xtime.AddHours(1)).TotalSeconds " " + [int]$xSec + " Sec." # 37910 sec --> <html> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> <title>min-left-2</title> <style> p{color:red;} </style> <script type="text/javascript" src="jquery-1.7.2.js"></script>
Looking for autofill tutorial
Hello, New to jQuery and loving all the plugins. I am looking for a tutorial on how to autofill a form based on text field and query without reloading the page. For example enter the Company name and onchange it fills in the contact, address, city, state, zip, etc from the Company table. Thanks in advance for any guidance you can offer. Gary
How to show server side error using jquery and ajax.
I am new to jquery and php. i have one query that i have mentioned below. plese help me to fix this query. 1.) I want that when i enter email in signup form for signup who already registered in database then a warning message show for account already existense. I use jquery validation plugin for client side validation and use ajax for form submit. when i signed up successfully, successfull-message show properly in a div which class is ".signup-success". but when i enter email that already registered
Need help with json
hi all i am newbie to json someone gave me a script but i need it to be fetched from json file it self not use the java script need the file trying to make a non faucet list but its not happing as i feel like to give up if any one can help me it be great <!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap Example</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
Adjusting the width of a text input type
I'm using a text input, and whenever I search for anything on how to adjust the width of a text input, I get results for JQuery UI Mobile. Here is a sample: <label for="seed">Seed:</label><input type="text" name="seed-input" id="seed" placeholder="Leave blank for random seed" />I'm new to JS, JQuery, and CSS.
can you use jquery to target div in a flexbox markup if it is offline
I am attempting to change several off line framework based educational "apps" (study-ssytems ????) to flexbox before frames go away. It seems the only way to target a div is thru javascript or Jquery. I know neither. Ouch! I am a teacher who never took a computer course. But have developed with raw css1 til now 3 and html 2 til now changing to 5 educational "apps" they are note taking systems and study resources. It's not small as I have more than 10,000 links. in the 86gb of files. Everything
Display div if text found, hide otherwise
Hi, looking for script to search for a specific text string in div1 if text is found set div2 style to display:block; else set div2 style to display: none; <div id="div1">Contains or does not contain specific text</div> <div id="div2"></div> style="display: block;" or display:none; Thanks!
jquery function
Hi there, I have some fields in same page, that I need check before save data in db. I created one function for each section, and for check I use a if chain if(checkTestata()){ if(checkVigili()){ if(checkMezzi()){ if(checkAutista()){ interventoSave(); } } } until function checkVigili everythings is ok. But function checkMezzi() don't work properly. This function check a table, and show a message to the user,
How to resolve "SFM_GUI.js:1555 Uncaught TypeError: Cannot set property 'innerHTML' of null"
Hello All, Please help me to resolve below error. Thanks in advance Chandu
Bradley Witham- Jquery errors
Hi, I am Bradley Witham I am new to jquery, How do i see Jquery errors? Thanks, Bradely Witham
what is wrong with this code ?
function getMessageText() { return $('message').text; } document.body.innerHTML = '<div id="message">The message</div>'; console.log(getMessageText()); what is wrong with this code ?
trying to get 'index' in a collection
I need to use a collection for this feature. I am trying to hide (or remove) the div.form-q element, but can't seem to select it. I have set up a console.log to try to see it's length. What am I missing here? I know a table would be better suited for this, but I must use this collection. /*hide delete file & make dropdown required on additional attachments*/ var uploadFormat = function(){ var i = $(this).index(); var c = $('#q270 div.form-q').legnth; var descrCell = $('#q270 div:nth-child('+i+')');
Retrieving data from a json file into a variable
Hi guys, I have these two codes. One give me an array of usernames from a json file. The other one check if a username has been taken (but just from the variable "userList"). How can I implement them together? I want the second code to check inside the json file instead of the variable userList. Also,is it possible to check inside a mongodb database instead of the json file? I have been looking every where but can't find any recent information about it. Thank you. $.getJSON("/usernames.json", function(data)
JavaScript substring issue with two word - Please help
I have a url during runtime urlValue = http://intranetportal.com/sites/PeopleSearch/Pages/peopleresultsPrint.aspx#Default={"k":"","r":[{"n":"Office","t":["\"ǂǂ426f73746f6e\"","\"ǂǂ4368696361676f\"","\"ǂǂ4443\"","\"ǂǂ4c6f7320416e67656c6573\"","\"ǂǂ4e657720596f726b\"","\"ǂǂ53616e204672616e636973636f\"","\"ǂǂ53696c69636f6e2056616c6c6579\"","\"ǂǂ554b\""],"o":"OR","k":false,"m":{"\"ǂǂ426f73746f6e\"":"Boston","\"ǂǂ4368696361676f\"":"Chicago","\"ǂǂ4443\"":"DC","\"ǂǂ4c6f7320416e67656c6573\"":"Los Angeles","\"ǂǂ4e657720596f726b\"":"New
css transition updated with ajax call
I would like to ask help regarding a CSS transition which works, but is not working when I update the page through a ajax recall. I try to explain: I defined a compass CSS object and a arrow of this compass which should be oriented in the compass as the wind does (wind direction is updated every second). I created a CSS object and the arrow moves to the initial position slowly with the transition effect. Than every seconds there is an update of the wind data and I use a Ajax call to update the page.
navbar class active impresice
Hi, The navbar (bootstrap) holds several links. When clicking on a link the page does! scroll to the right location but the upper <section> link remains active. I have to scroll down another ~100px manually to have the correct (next link) active. I have tried all sorts of things, like moving the id up/down the section, or set and .anchor with padding/margin-top. But nothing worked. How do I fix this? Cheerz!
Why debug is not properly working in jquery validation plugin?
when I used debug true in this script warning show in console that : Uncaught TypeError: form.submit is not a function at a.validator.submitHandler() and When i do not use debug method all are working fine.. help me guzz how to use debug true method properly... i am bigginer in Coding... my Code Are below: HTML CODE: <form action="test.php" method="GET" role="form" id="signupForm"> <legend>Demo Form Validation</legend> <div class="form-group"> <input type="text" class="form-control"
Start slider transition on selected slide
I'm working on a simple banner slider, so it rotates automatically and I have dot navigation to display or show the selected banner slider, my problem is I cant achieve my goal to let the transition start from the selected image. I search some codes in the internet, but no luck. I hope you understand me. Thanks Sample Code
Jquery not running
Hello, I am relatively new to Jquery and Javascript. I am trying to manipulate a plugin into what I want it to be on wordpress. I have my php and html the way I think I want it. I have a small bit of code for Jquery that I have been trying to get to do something but for some reason, it won't run. any idea why this would be? Here is the html I am trying to change: echo "<table class='timecard1' ><caption> Week 1</caption><tr align='center'><tr align='center'><td></td> <tr><td>{$this->int_to_weekday($options['week_starts'],
Beginner - How To Only Display Div Element on Specific Url?
Hi there, I´m completely new to JQUERY, so excuse my ignorance! I basically only want to show a div on a specific URL. I have a property website, and only want to give the initial area info at the top of the first landing page (specific URL) then to disappear when user clicks to next page etc. If someone could give me the code I need to use that would be great. Many thanks. So show on /mijas-costa/ ONLY mijas-costa/?page=1 page=2 etc etc hide
Jquery is click not working in firefox
same JQuery is working in chrome but this jQuery is not working in firefox. $('.attachmentslist li a span').click();
changed css not applied to new elements??
I want to change css ... for example I am using: $('table').css('background-color','green') But then, when I go to add a new table (as below), it is colored the same way as the initial css definition $('<table><tr><td>a</td></tr></table>').appendTo('body'); I did do a goole search before this, but the "fix" seemed to be more of a work around and involves cloning existing elements (which sounds horrid ) I did up a quick example here:https://jsfiddle.net/mam80cxj/ Any ideas? Thanks, Kris
stopping an animation after one iteration
Hi, I can’t figure out how to cancel an animation after a first iteration ( using old-fashioned jQ animate() ) . The animation works like this: click on the image and the image is re-sized and re-positioned. I can see two ways which could stop further, unwanted, clicking: change the z-index of the image, so that it goes down the stack, behind a transparent screen--(the screen is integral to the page anyway, it's not just for this animation); or wrap the function with one{), like $(‘#myimage').one(
Promise and Deferred objects!
Hello everyone! I need to find out some moment concerning Promise and Deferred objects: 1. which of these objects belongs jQuery and which to pure JavaScript 2. what is the difference between these objects (besides described above) 3. has deferred.promise() method anything in common with objects Promise (besides name, of course))))) 4. why when new Deferred object is made there is no keyword "new" 5. methods when() and then() are methods of what object: Deferred or Promise Thanks a lot advance!
its not working for me..
<!DOCTYPE html> <html> <head> <style> .draggable { width: 200px; height: 200px; padding: 0.5em; float: left; margin: 0 10px 10px 0; cursor: move; } .draggable, a { cursor: move; } #draggable, #draggable2 { margin-bottom: 20px; cursor: move; } #draggable { cursor: move; } #draggable2 { cursor: e-resize; } #containment-wrapper { width: 100px; height: 100px; border: 2px solid rgb(204, 30, 30); padding: 10px; } h3 { clear: left; } </style> </head> <body> <div id="containment-wrapper"> <div id="draggable"
Unable to append div element to an amazon page
Hi, I am trying to append a div element with red background color to the body of an amazon.com page. The html is showing up as plain text. I understand something is interfering with the added html. I would like to know what I need to do to successfully add the div element. Here is the code. $("body").append("<div style=\"background-color: red;\">test</div>"); I appreciate the cooperation of forum members.
Make paths work correctly with .load into div.
Hi, I'm back again! This time, latest jquery versions I promise. ^^ I'm currently trying to use the phpbb forum of my website as a sort of "comments" section on my webpages, and after mulling it over for a long time I've decided to not use an iframe and try to do to this with jquery (since I'm already using it now anyway). However when I pull the forum topic page into a div with .load, all the paths get broken. For example, website is site.com and forum is at site.com/forum and when I load the
How to follow a hyperlink in a div, and have page show in same div?
Hi all, quite a newbie here. Recently started converting my semi-dynamic php/html webpage to a full-blown dynamic ajax page. Currently have: $(document).ready(function() {
// Check for hash value in URL
var hash = window.location.hash.substr(1);
var href = $('#menu a, #name a, #contact_us a, #item a, #text a').each(function(){
var href = $(this).attr('href');
if(hash==href.substr(0,href.length-4)){
var toLoad = hash+'.php #pagearea';
Script from external file still firing even if the element is empty
I have 2 html files 1. main.html
2. external.html - contains script tag
external content will be loaded to main.html once a user click the button using jquery.load function Now my problem is if the user click twice the load button, the functions inside the external.html fires twice also even if i emptied the div element in main.html i tried empty()and html("")functions to clear out the content of the div but still no luck. this is my code http://plnkr.co/edit/XLZGquoebTTHahgJWNOk?p=preview
my first script for scrolling to bottom of text in textarea
Through my index.php the file scripts/LM_info.js is loaded. The file jquery-3.2.1.min.js resides in both the index.php location and the scripts-dir. It is intendend to scoll a textarea (<TEXTAREA name=\"LM_archive\" ...) to the bottom. The script: <script src="jquery-3.2.1.min.js"></script> <script> $(document).ready(function(){ var $textarea = $("LM_archive"); $textarea.scrollTop(99999); }); </script> //<script type="text/javascript"> //var textarea = document.getElementById("LM_archive");
Unable to retrieve table header values using jquery
Hi I am unable to retrive the content of my html table using the below jquery.Please help $("#save").click(function(){ var tbl = $('#timeTable tr').map(function() { return [$(this).find('td').map(function() { return $(this).html(); }).get()]; }).get(); console.log(tbl); });
We want to see the view source code file. (search.php) ?
Link : http://jqueryui.com/autocomplete/#multiple-remote
Manually click on all items of autocomplete result.
I am using autocomplete jquery. I type something in autocomplete textbox, it search more than one item by ajax call. I want to trigger manually click event on all items of result.
Adding pauses to a function
Hi: the following function shows the text associated with each of two instances of a class--hover on either instance of 'myclass' and you'll get the text associated with it, and the text associated with its neighbour: Code: function showBoth() {
$('.myclass').hover(function(){
$(this).find('.mytext').visibility('visible');
});
$('.pair1').hover(function(){
$(this).next().find('.mytext').visibility('visible');
});
$('.pair2').hover(function(){
$(this).prev().find('.mytext').visibility('visible');
});
}Both
Next Page