Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I got a problem with my jQuery code on a Website.
Website: LastDeath
I want what the title says, to change the value text in an input button(Send Button).
I've already Googled and tested some code snippets from other questions, but it doesn't fix my problem. So I asking U guys! :)
If u open the console(in chrome #chromelover) go to sources, js, jq-main.js
you can see the current code snippet(MESSAGE FORM) for the input button, test.. do whatever you want with it and I would appreciate a comment.
Thanks,
Mike.
A few things:
Load jquery first using:
<script
src="https://code.jquery.com/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
crossorigin="anonymous"></script>
I would start with:
$(document).ready() ...
As I've never seen $().ready().
I guess it's what's breaking your code.
I don't understand your idea of changing the text on the button as it is the submit button and the page would be reloaded. In case you want to submit using an AJAX request later, you may want to use preventDefault (https://api.jquery.com/event.preventdefault/) to prevent page reload.
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
I shouldnt even be in HTML/CSS, but here I am trying to incorporate a php modal contact form into my site...
I'm trying to get all of a demo form's functionality into my footer page (and then I'll restyle everything.)
http://danux.me/sections/footer_modal.html
I'm trying to get "email me" to fire ideally, but am settling now for just the Demo button to fire the popup form.
I also uploaded the demo form I'm pulling code from, just to make sure it works on my site. (It does.)
http://danux.me/contact/
Any guesses as to what I'm doing wrong?
Your first link is in a different folder, yet the url for $.get points to the same relative file. Which isn't there.
So in contact.js needs to have
$.get("../contact/data/contact.php", function(data){
I obviously cant test this. And it looks like there is some redesign in folderstructure coming up.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I have this anchor tag
<a class="productin" onclick="openbox()" data-pid="23">Report</a>
This opens up an modal box which sends an email, I have a hidden input tag inside that email form in which i want to add that data-pid
<input type="hidden" name="productid" id="productid">
Since you tagged this question with jQuery, I'll give you the jQuery answer. This should work:
$(function(){
$('a.productin').click(function(){
$('input:hidden[name="productid"]').val($(this).data('pid'));
});
});
FYI - It is normal procedure in Stack Overflow to post the code you have tried on your own. We are here to help you fix issues with your code, not to write your code for you. In the future do a search for an answer before you ask the question and give it a shot on your own. Then, you can ask why your code didn't work posting the relevant code for us to see. That's is why your question was voted down.
It is also normal procedure for the downvoter to explain why he voted it down.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I'm trying to change or remove errors from a HTML page I'm using firebug add in firefox and I have this part which I really don't where its writen :
is there a way to get the file where this is write .
thanks for any hint
Continuing from my comment: The highlighted element is dynamically added by a slider plugin e.g. like http://jqueryui.com/slider/ The clue is the classes like ui-slider-handler.
Look for the id="voltage" to find the place in the HTML where the div is and look for #voltage or ("voltage" or 'voltage') to see where the plugin is connect to it (in any jQuery or Javascript code).
I don't think you can get the exact path of the file, but check "View page source" option to see what files the page has been linked to.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
Hey guys actually i'm trying to give my website users a possibility to click on a button and have some predefined text, in my case contact informations, to the clipboard.
These informations are already given in a div tag with the id="footer" and i want to fetch those or predefine them manually in syntax.
At the end of the page is a scissor, this is a after:element, this element ill change to a link or anything other so i can make it work.
Here's a link to the site
You can try this jquery plugin:
https://github.com/zeroclipboard/zeroclipboard
This makes it possible to copy text to youre clipboard with a button.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
$(document).on('click', 'div.item_2', function(){
alert('buy');
});
the item exists on the page, anyway this should work no matter if the element exist or not, its a delegated click, but I can't understand why it not work on my:
<div class="item_2">
</div>
there are no event removers, where I should look to find a bug? cause I don't see any reason that it should not work...
A div that is not visible will not fire the click. See this question.
Are you sure you've included jQuery in the <head>?
Are you running on your local filesystem? If you copy and paste from jQuery from google:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
It won't work on your local file system. You'll need to add http: to the url:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>