jQuery-News-Ticker icon indicating copy to clipboard operation
jQuery-News-Ticker copied to clipboard

Added JSON Ajax feed type, random feed order and general improvements

Open Umaroth opened this issue 7 years ago • 0 comments

New options:

  • feedType: 'json'
  • jsonType: 'array', 'object'
  • jsonObjKey: string matching which key you want to return from the object
  • order: 'sequential', 'random'
  • offset: number of pixels, default is 20

jsonType only must be set if feedType == 'json' jsonObjKey only must be set if jsonType == 'object'

General code improvements:

  • Changed deprecated .live() function to .on()
  • Replaced implicit variable declarations with explicit ones
  • Removed unnecessary semicolons
  • Uniformly converted preceding spaces into tabs
  • Removed following empty space
  • Changed all comparisons to strict
  • Fixed broken comparison
  • Added error callbacks to ajax calls

Umaroth avatar May 05 '17 23:05 Umaroth