Target a specific <div>
Hey guys, thanks for reading! I'm in the midst of some volunteer work for my local roleplaying community, creating their website. I want to use a menu bar in the top with a <ul> and simple "a href"'s to switch between the main content. The content of each 'page' will be retrieved from a phpBB board using php. I've chosen jQuery because I want to learn more about it and have stumpled upon this problem: How do I target a div, show that, and then hide the current one (or simply all other divs with a
jquery change function
Basically the idea I want to accomplish here is to kill the defaultCharID and defaultCharacterName session variables and when a new choice is made from the dropdown then create a new sessions with those new data. <?php session_start(); // Access the existing session // Include the database page include ('inc/dbconfig.php'); // Include the variables page include ('inc/variables.php'); $userID = $_SESSION['userID']; $isAdmin = $_SESSION['isAdmin']; $defaultCharID = $_SESSION['defaultCharID']; $defaultCharacterName
Script needs to be below ID's
Following code will not work <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script> <script type="text/javascript"> $('#jQ').click(function() { alert('Handler for .click() called.'); }); </script> <input type="button" value="jQuery" id="jQ">However this works <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script> <input type="button" value="jQuery" id="jQ"> <script type="text/javascript">
Andriod & Jquery
Can Jquery work on the Andriod platform (Andriod 2.2 browser)? I attempted to use jQuery to create a game. It works fine in Safari, Firefox and the iPhone, however, on Andriod I get random syntax errors in jQuery.js. The syntax errors change lines on every line, so I do not believe it is an issue with the specifically. Is there a mobile version (not Jquery mobile as I want the power of jQuery not a interface framework) that is appropriate for Andriod? Thanks.
JQuery Ajax - Request sending
Hi, This is my first ever application in PHP,Mysql and JQuery. I am novice in all of these technology and learning through the manuals and books. I got stuck into a situation where I am using JQuery's ajax method to submit a form.. I want to pass the url as "index.php?action=product" to jQuery.ajax's url parameter and the type parameter is "POST". Check out my code below.. $.ajax({ type : "POST", url : "index.php?action=product", data : strPostData, success : function(msg){
Obfuscation of JS files
Hi, I have a custom download of JQuery 1.7.3. Thus got 2 .js files named jquery-1.3.2.min.js and jquery-ui-1.7.3.custom.min. Since there will be 2 seperate http requests from client to download so i want to merge both of them into a single .js file. Can i do this? if yes, how can i obfuscate the merged file to reduce the overall size? Thanks
jQuery and Dreamweaver cs4 Problem
I am in the process in teaching myself web design, I know how to do basic CSS and understand code quite well, however, when ever I use jQuery I get "there is a syntax error on line..." I have followed two seperate j Query tuts and have also copied code off other sites and still get this error through my code on different lines alll thhhee tiimmee... At first I thought it maybe something I was doing but now I am thinking otherwise. Here is a screenshot of my code, I hope you are able to get back to
JSONP in Jquery.POST()
Hi, Is it possible to implement JSONP with POST and PUT ? When i try to do $.POST with datatype as JSONP , I could see that the request is sent as GET and not as POST. Is it possible to achive JSONP with POST ? Thanks, Pradeep.
Max-width isn't set in IE
Hi, When I use this code the width is set in all webbrowsers: $('.content img').css({'width': '550px'}); But it also sets all the smileys to width 550px. So now I want to set the max-width, but it doesn't work in IE. Its simply not set. $('.content img').css({'max-width': '550px'}); Anybody knows a good work around? Christophe http://www.opera.com/
jquery animation gets stuck
Hey all. I'm using Jquery to create a rollover effect on 2 images (placed on top of each other) to fade the bottom image in on a mouseover and out on a mouse out. Clicking the faded in image also opens a fancybox gallery. The problem is that sometimes the animation (the fade in and out) gets stuck after closing the fancybox window and the mouseover doesn't work anymore. here's my code for the mouseover: $(document).ready(function(){ $(".appearing-image img").css("opacity",0).fadeTo(500, 0); $(".appearing-image
jQuery 1.5.1 ajax data not sent to server
Hi I have the following piece of code: $.ajax({ data: someData, url: submissionUrl, dataType: "jsonp", success: ajaxSuccess, error: ajaxError }); where someData is a vanilla object of key/value pairs, submissionUrl is a valid URL and ajaxSuccess/ajaxError are both functions. Using jQuery 1.5.1, the GET request is delivered to the server without the data. Using jQuery 1.4.4, the request contains the data. Has something changed in the way I should be assigning data to an ajax request
jquery url refresh and bookmark problem
hey all, i've got links on a website that takes the user to different parts of the same page (i.e, no reloading of the page) I would like 2 things to happen when a link is clicked: 1) the url changes eg. from mysite.com/home to mysite.com/about when the about link is clicked. 2) when refreshing the page that it stays where it's at and not go back to the top of the page. thanks Dan
Dropping issue
Hi, I have an html page with 2 'div', with different size border, in it, let's call them D1 and D2. D1 is the father of D2 (so D2 is in D1) and they're both 'droppable'. The problem is when i want to drop a new div in D2, it always drop it in D1. I think that i miss a droppable option. Someone can help me?
Who is a representative of the jQuery project?
Who is a representative of the jQuery project? Is it Mr. John Resig? Please teach.
jQuery 1.5.1 for Greasmonkey
Why firefox 4 beta 11 in, Greasemonkey addons ,userscript can not use live() function? http://userscripts.org/scripts/show/63761
Event before .ready
Does jQuery have a way to load before .ready? I tried Quaryloader and got it to work but the issue is I have so much data that there is a pause for like 5 seconds then it does it's stuff. I need something to fire right away so as the page is loading it can call a spinner and let user wait until page finishes loading.
Can anyone help me to simplify this code please?
Hi all the gurus!! Does anyone know why IE doesn't read this code? it returns NULL lol var imagePath = $(this).parent('div:first').find('img').filter(function (index){return $(this).css('display')=='block';}).attr('src').replace('.jpg', '_bw.jpg'); Thanks heaps!!
How can I use jQuery in my javascript plugin?
Hi, I've been working on a javascript plugin, which can be embedded to any page without making any confliction. (Such as meebo or wibiya) I want to use jQuery in this plugin, but I could not find how to embed. Maybe I could add jquery file to the header of a page, but there could be another jquery file already in the page. how can I avoid confliction between 'my' jquery object and 'their' jquery object?
Search 3d Array w jquery
I like to have a search function that is "SQL LIKE" type on the locations array. I did one simple function using a loop, but it is an "exact phrase " search so one have to write exactly the same as the value in the array for a hit. I would like a more "blury search" that hits all containing that search value.. for example search for 11111 will hit values 11111 A 11111 B 11111 C Now one have to search 11111 A or no hit.. To make things more complicated the array is 3D like the "locations" /"markers"
Come help me and get paid
So yeah im currently doing a project , im almost done , just missing couple of thing , is there anyone who could assist me with my questions via Skype , msn , ventrilo or anything like that? I could make a donation via Paypal for it , Thanks
problem creating a dialog box with specified number of contents visible
hi all i am trying to create a dialog box, now the content of this dialog box is nothing static, it will be loaded dynamically at the time i call this dialog box. i am able to call this dialog box, i have a table with an id to which i add one row at a time dynamically. here i am having the problem, i want only 10 rows of that table to be visible, but i am unable to set that thing. if i change the height to be relative, it wont show on UI, but when i click on the dialog box, the dialog box size increases
Jquery context menu doesnt appear in safari on mac
I am facing an issue with the context menu.my context menu doesnt appear in safari on mac.it shows its default menu.my context menu works in firefox on mac and all major browsers on xp... Plz help me out with any available fixes..
Jquery ajax
i made a instant update feature on my web page with a ajax call using jquery.. <script type="text/javascript"> function getRandom() {var instant=$.ajax({ url: "instant.php?fetch=1", global: false, beforeSend: function(xhr) { xhr.setRequestHeader("Connection","Keep-Alive"); xhr.setRequestHeader("Keep-Alive",true); }, async: false }).responseText; if(instant.length>6) { $('#instant_server_push').html(instant); $('#instant_server').show(50); var wall_id=document.getElementById('wall_childid').value;
contextmenu doesnt show up in safari on mac
I am facing an issue with the context menu.it shows the default contextmenu in safari.this problem is only with mac...it works fine with firefox on mac n all other browsers on xp... Plz do reply with any available fixes..
Creating a Tree and Table view
Hi, I have to display a complex hierarchy. The best way I have found to do this is to have two panels side by side. The right panel would have the Tree view and the left would have the Table that would list the items in the currently selected Tree Node (Kind of like windows explorer.) I have two, rather weighted questions. 1) Is this the best way to display complex, hierarchical information, or is there a slicker way to display this sort of data? (basically have files in different levels and those
How do i prepend to a div loaded via ajax?
Hello, As the title says, im having problems trying to prepend data to a div that im reloading with ajax. I understand that because this instance of the element does not exist when the dom loads, i probably can not simply use the prepend call. With for example, with the click command, instead of: $('#button').click(function(){ //click function }); i can use: $('#button').live('click', function(){ //click function }); which lets me bind a click function to an element that has been loaded in with ajax.
Mouse over tag for share icons
Could anyone provide sample codes for making mouse over tag for share icons ? just like the share icons as below link http://news.cnet.com/8301-13579_3-20037907-37.html?tag=topStories1 I mean , once mouse over the share link , there will be a list of drop down icons for linking other pages, it is only disappeared when pointer moves out of its area . Thanks in advance .
Selector for flash video?
My site plays a video clip using VideoJS. I’ve placed a div over the video window with absolute positioning. A jQuery statement causes the div to hide when the video is clicked to play. This works in Safari, Firefox, and Chrome which all use the <video> player but not in IE which plays the video in Flash, using flowplayer. The jQuery statement: $(document).ready(function(){ $('div.video-js-box, object.vjs-flash-fallback').click(function() {$('.video_title').animate({opacity: 'hide'}, 1000)
jQuery and Andriod
Is it possible to use jQuery on the Andriod platform? I am making a Javascript based game using jQuery and it works fine on Apple iPod/iPhone/iPad. However, Andriod gives a syntax error on a random line (it changes per refresh) of jQuery.js. Or is there a mobile version of jQuery (not jQuery Mobile...don't want the interface)? I tried using the newest version of JQuery as well as 1.2.6. Any help in this matter would be greatly appreciated.
DIV question
Does jquery offer a way to show whether a div is hidden or visible? I have a routine where the div is getting hidden when it should be visible and I am trying to create a debug to show the current setting of the div
Quick question about saving a page.
Anyone know how I could save a page which has some pictures that can be resize and drag ( with draggable and resize plugins) ? I tryed to save the page the default way ( go in page , save page as ) but when i try to open it, I cant move the pictures anymore, so I guess it's because the page lost the ID of the pictures and the variables of the page? Is there anything I could do about it? I read couple of post about cookies but I need to store those files on my server cause the client need to get that
jQuery just isn't operating...
I am new to jQuery and Javascript but I have a firm understanding of it's fundamentals (at least I think I do). I put together a basic Test Page to see if the functionality would work, but it is not. This is what I wrote: <!DOCTYPE html> <head> <title> test page </title> <style> #box { height: 100px; width: 100px; background-color: #0000ff; } </style> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type="text/javascript"> </script> <script
[jQuery] How to get the entire width of a page
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv=Content-Type content="text/html; charset=us-ascii"> <meta name=Generator content="Microsoft Word 11 (filtered medium)"> <style> <!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman";} a:link, span.MsoHyperlink {color:blue; text-decoration:underline;}
wrapAll($(something)) doesnt work in IE
Hi All, I'm having a problem with wrapAll() in IE in Chrome and firefox it works fine. However in IE it makes Javascript execution stop. Here's the site: http://codestairway.com/LoLItemsHierachy/. Line 50 is where the problem occurs. I tried switching: "$(ul).append($(this).html());" with: "$(this).wrapAll($(ul));" but that causes the html of $(ul) to not append or something like that. Or atleast it doesnt show up in all browsers. Anyone know the cause of this? Thanks in advance, Rope.
Adding Click Event To Pagination
My issue here is that the click event (edit) will work on page one but it won't when there's more than one page. What I need to do is add the click event to each page and I'm not sure where I need to accomplish this at. <?php error_reporting(E_ALL); // Include the database page include ('../inc/dbconfig.php'); $query = "SELECT CONCAT_WS(' ', handlers.firstName, handlers.lastName) AS name, DATE_FORMAT(characters.dateCreated, '%M %d, %Y') AS dateCreated, characters.ID, characters.characterName, statuses.statusName,
Post Json object and redirect URL
Hello, I would like to redirect my request from a page to another one with a json object. The only way i have found to do this is : $.ajax({ type: "POST", contentType: "application/json", url: "/SaveMyJsonInSession", data: $.toJSON(model), success: function (result) { // redirect to validation window.location.href ="/UseMyJsonInSession"; } }); Is there a way to do this without using .Ajax
Please help me a little - jquery Slide show
I made a simple slide show using jquery and "setInterval() " function. Everything working fine but I just need to start this serInterval function only after the div or page loads completely. I will post my code here ... $(document).ready(function () { var s=setInterval('slide()',3000); }); function slide(){ var pos=$("#slider").position().left; if(pos>-5400){ $("#slider").animate({"left":"-=600px"},300); }else $("#slider").animate({"left":"0px"},600); } }and my html page <div id="imgContainer"
jQuery Accordion trigger on radio click
I'd like to start off by saying I'm a newbie to jQuery (which will become apparent in a few seconds). First I'll tell you what I am trying to do....I have a simple form where a user can fill out info to buy a product. On load, it hides the "Billing Address" area, assuming everyone is using the same shipping and billing address, and asks the user "Is your billing address the same as your shipping address?" and there are two radio buttons "Yes" and "No" (By default, "Yes" is checked.) If the user clicks
How to re fire a script.
Hello, I am brand new to jQuery. I want to know when I load a new html that changes a section of the page and it is dependent on the jQuery script that has run once when page ready how do I re run the script again when the new html section gets loaded.
How to automatically group/wrap n elements with a div?
I've got a list of paragraphs like so: <p>...</p> <p>...</p> <p>...</p> <p>...</p> <p>...</p> <p>...</p> <p>...</p> I want to get jQuery to group 3 paragraphs with a div like this: <div> <p>...</p> <p>...</p> <p>...</p> </div> <div> <p>...</p> <p>...</p> <p>...</p> </div> <div> <p>...</p> </div> The last div will simply contain the remainder number of paragraphs. Appreciate your help, thanks!
Next Page