i have some regular html form with few inputs (text). all the form parameters are sending to asp.net page that handling the data (by parameters) and thats work fine. I also have one checkbox that need to send true if it checked or false if didn't checked. all the sulotions i found on the internet is to check if the user is checked one of few checkbox or if the user checked at all, and can't find what i need, which is to send true / false parameter after clicking the SEND btn.
I'm attempting to make a simple hover image gallery with a static large image which swaps with a thumb on hover. However, on hover what happens is the new image comes up as the large image and if I then hover over another thumb it replaces that thumb with the original bigpic image source.
This works in Firefox but will not in chrome. In chrome the .css works and changes the cursor to the hand on hover however .attr does not work it doesn't put the onclick attribute on any of the images.
I'm getting a value from the database either true/false. I have a alert box that shows it being true/false. I want a checkbox to be checked if true else not. Here is the line of code that I have and it just automatically checks everytime, which I obviously don't want.
I don't know why but it's not working no matter how much i try to do it. I was planning on posting some elements on a page's div and one of them allows for mutiple things going on at once, as in allows for someone to have more than one of something. And since i don't think that it'll be working right if i try to pull it from 1+ items with the same name it'd just show the last one? Or is it that PHP would show them as a list... either way it's seeming that .attr() doesn't allow for a name change for some odd reason. And i was wondering if there was any function to allow for this to be changed easily written within jquery.
I'm trying to load one page into another using the .load() method. This loaded page contains a script that I want to execute when it has finished loading. I've put together a simple example to demonstrate:
When the link is clicked, the content should load and the second paragraph should fade away. However it doesn't execute. It is not just a matter of the DOM not being available, a simple alert("") won't execute either. However, if I do away with the #toLoad selector in the .load() call, it works fine. I am not sure why this is, as the <script> block is clearly in the scope of the #toLoad div? If the script from content.html was in the .load() callback, it works fine. I have worked around the problem by having the callback use .getScript () to load "content.js" afterwards and have the JS logic in there. This is arguably a more elegant solution anyway, but I'm keen to know *why* the above doesn't work, is it a bug?
I have a set of checkboxes that trigger events on a page. Clicking a checkbox triggers the event correctly and the checked attribute changes in the page source, but in the rendered browser view the checkbox status remains changed. If I load the page with the checkboxes checked, they always remain checked in the browser view. If I load the page with checkboxes unchecked, they always remain unchecked in the browser view.
If I remove the jquery code the checkboxes work as expected, but obviously don't trigger any events. I've tested this in both Safari and Firefox with the same results.
On another note, I'm having problems with the back button when using the forum. If I am looking through a multi-page search and click on a topic and then click the back button, I go to the first page of the search instead of the last page I was looking at. Similarly, when I first previewed this post and clicked "back" I was returned to the topic list instead of the compose-post page.
<span id="more"> Did you know? <span>The milky way is round.</span> </span> Using $("#more span").css("border", "1px solid black");
will place a black border around "The milky way is round." If I change the <span> tags in the HTML to <div> tags and issue $("#more div").css("border", "1px solid black"); The same will happen. "The milky way is round" will be framed. However, if I change the <span> tags to <p> tags, as in
Have an issue with using $.ajax for requests. If I set async: false it works fine, but sometimes gets cached content. If I add in cache: false then async doesn't work anymore, the next ajax request gets called before the first one finishes.