4 Replies - 1190 Views - Last Post: 04 June 2013 - 11:20 AM

#1 laytonsdad   User is offline

  • I identify as an attack helicopter!
  • member icon

Reputation: 467
  • View blog
  • Posts: 1,998
  • Joined: 30-April 10

jQuery quoteme plug-in guidence

Posted 03 June 2013 - 06:12 PM

Hello all,

I am working on a jQuery plug-in the will style a plug in for quotes.
Spoiler


My question is do you guys/gals see anything that may come and bite me later? I am interested in any thoughts you may have. Thank you for your time.

This post has been edited by laytonsdad: 03 June 2013 - 06:21 PM


Is This A Good Question/Topic? 0
  • +

Replies To: jQuery quoteme plug-in guidence

#2 Dormilich   User is offline

  • 痛覚残留
  • member icon

Reputation: 4303
  • View blog
  • Posts: 13,677
  • Joined: 08-June 10

Re: jQuery quoteme plug-in guidence

Posted 03 June 2013 - 10:35 PM

each() shouldn’t be necessary. jQuery setters usually work on all nodes.
Was This Post Helpful? 0
  • +
  • -

#3 laytonsdad   User is offline

  • I identify as an attack helicopter!
  • member icon

Reputation: 467
  • View blog
  • Posts: 1,998
  • Joined: 30-April 10

Re: jQuery quoteme plug-in guidence

Posted 04 June 2013 - 10:33 AM

In the tutorial I used to do this was building a tooltip, I used the each because he said that it would only change the first occurrence of the class that was selected if not using each. Is this not true?

Also, I am planing to add a hover effect will it need the each then?

This post has been edited by laytonsdad: 04 June 2013 - 10:36 AM

Was This Post Helpful? 0
  • +
  • -

#4 Dormilich   User is offline

  • 痛覚残留
  • member icon

Reputation: 4303
  • View blog
  • Posts: 13,677
  • Joined: 08-June 10

Re: jQuery quoteme plug-in guidence

Posted 04 June 2013 - 11:16 AM

if in doubt, ask the documentation:

http://api.jquery.com/css/ said:

Set one or more CSS properties for the set of matched elements.


though you need to be extra carful, what you pass to css(), because:

http://api.jquery.com/css/ said:

Get the value of style properties for the first element in the set of matched elements.



rule of thumb: jQuery methods usually get the first item and set all items.
Was This Post Helpful? 0
  • +
  • -

#5 laytonsdad   User is offline

  • I identify as an attack helicopter!
  • member icon

Reputation: 467
  • View blog
  • Posts: 1,998
  • Joined: 30-April 10

Re: jQuery quoteme plug-in guidence

Posted 04 June 2013 - 11:20 AM

That is what I thought, I will be building on this over time so the input is helpful. Thank you.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1