How to set image for tabbar?

JQuery: How to get and set image width and height for a jQuery fancybox image?

Shree Khanal at Quora Visit the source

Was this solution helpful to you?

Other answers

Generate a temporary img element with src as image path and get width on load event. var image = this.images[index]; var width, height; $("<img/>") .attr("src", image.image ) .load(function() { width = this.width; height = this.height; }); Refer : http://stackoverflow.com/questions/318630/get-real-image-width-and-height-with-javascript-in-safari-chrome and https://api.jquery.com/load-event/#load-handler

Pranav C Ramanthali

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.