Jump to content

ibautista

Member
  • Posts

    8
  • Joined

  • Last visited

ibautista's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Here's the way you do it in jQuery http://api.jquery.com/hover/
  2. you can use media queries. http://mobile.smashingmagazine.com/2010/07/19/how-to-use-css3-media-queries-to-create-a-mobile-version-of-your-website/ This is the best practice way to make sure your website is a responsive design and scales accordingly based on the particular resolution for each device, phone, tablet, laptop, desktop.
  3. what are you trying to do? add a map to a site? find a location of a user on a mobile device?
  4. I'm working on a mobile app using jquery mobile, and I have a page of my app that has links to around 50 items. I want to avoid creating 50 links and instead add the page dynamically whenever the user clicks the link to the page containing those 50 links. Any ideas how to dynamically add a page in jQuery, the documentation is kind of confusing so I was hoping someone could explain the process. Thanks.
  5. there are many ways to tackle this, you could use PHP includes to add the headers footer, etc or javascript and jquery. Unfortunately I don't know of any ready to cut and paste solution because you'll have to play with the code anyway in order to make it work for your particular application. If you're interested you can check this: https://developer.mozilla.org/en/Ajax http://www.xul.fr/en-xml-ajax.html http://code.google.com/edu/ajax/tutorials/ajax-tutorial.html
  6. I don't believe attribute is being used properly: As of jQuery 1.6, the .attr() method returns undefined for attributes that have not been set. In addition, .attr() should not be used on plain objects, arrays, the window, or the document. To retrieve and change DOM properties, use the .prop() method. Specially because you are using window, what about document.ready() instead. "Launching Code on Document Ready The first thing that most Javascript programmers end up doing is adding some code to their program, similar to this: window.onload = function(){ alert("welcome"); } Inside of which is the code that you want to run right when the page is loaded. Problematically, however, the Javascript code isn't run until all images are finished downloading (this includes banner ads). The reason for using window.onload in the first place is that the HTML 'document' isn't finished loading yet, when you first try to run your code. To circumvent both problems, jQuery has a simple statement that checks the document and waits until it's ready to be manipulated, known as the ready event": $(document).ready(function(){ // Your code here }); hope that helps
×
×
  • Create New...