76574

JQuery $('#image').addimagezoom, for pics dispersed from database

Question:

I have a variable that displays pictures that reference a row in a database.

When I use the the Javascript for magnifyzoom:

"$('#image1').addimagezoom({ // single image zoom zoomrange: [3, 10], magnifiersize: [300,300], magnifierpos: 'left', cursorshade: true, largeimage: '' " })

It will only zoom in on the first image. And then when I change the hash mark with a period, switching ID to CLASS, it will zoom in on all the images but it will disperse one type of image. If you need more information to help solve this riddle please let me know.

Answer1:

look like you need to use <strong>largeimage</strong> attribute in script.

$('.img').addimagezoom({ zoomrange: [6, 18], magnifiersize: [600,600], magnifierpos: 'right', cursorshade: true, cursorshadecolor: 'pink', cursorshadeopacity: 0.3, cursorshadeborder: '1px solid red', /*8888888 SEE HERE 8888888*/ largeimage: $(this).attr('src') //<-- No comma after last option! })

Fiddle below:

<a href="http://jsfiddle.net/s6TMs/10/" rel="nofollow">http://jsfiddle.net/s6TMs/10/</a>

Recommend

  • Dynamic image gallery generation using PHP and jQuery
  • Keyboard events for viewing the next and previous for a larger images
  • how to use two $.post methods very well
  • VerifyError: Error #1079: Native methods are not allowed in loaded code
  • Eclipse Swing WindowBuilder returns error when trying to set border
  • Are channel sends preemption points for goroutine scheduling?
  • VB.NET - RichTextBox - Apply formatting to selected text
  • Chart.js Multiple dataset
  • Groovy: Unexpected token “:”
  • Android - Material Design - NavigationView - How to put vertical scroll?
  • How to write order and limit within cakephp joins array
  • Custom validator control occupying space even though display set to dynamic
  • Word Open XML Mail Merge
  • Listbox within Listbox and scrolling trouble in Windows Phone 7 Silverlight
  • Disable Enter in editText android
  • Android fill_parent issue
  • FileReader+canvas image loading problem
  • Pass value from viewmodel to script in zk
  • Using $this when not in object context
  • Sails.js/waterline: Executing waterline queries in toJSON function of a model?
  • Deselecting radio buttons while keeping the View Model in synch
  • Getting last autonumber in access
  • Counter field in MS Access, how to generate?
  • Incrementing object id automatically JS constructor (static method and variable)
  • How to check if every primary key value is being referenced as foreign key in another table
  • Can I have the cursor start on a particular column by default in jqgrid's edit mode?
  • jquery mobile loadPage not working
  • Calling of Constructors in a Java
  • Traverse Array and Display in markup
  • Transpose CSV data with awk (pivot transformation)
  • How to delete a row from a dynamic generate table using jquery?
  • json Serialization in asp
  • Rails 2: use form_for to build a form covering multiple objects of the same class
  • python regex in pyparsing
  • Why can't I rebase on to an ancestor of source changesets if on a different branch?
  • How to stop GridView from loading again when I press back button?
  • sending mail using smtp is too slow
  • Busy indicator not showing up in wpf window [duplicate]
  • Why is Django giving me: 'first_name' is an invalid keyword argument for this function?
  • How can I use `wmic` in a Windows PE script?