SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Apr 2003
    Location
    Denmark
    Posts
    127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Problems with passing a variable

    I would like to pass a variable to jquerys .css({}) as illustrated below.
    But the variable place_slider_buttons is not passed WHY?

    Code:
    var place_slider_buttons = ((counter * 10) + (counter * 80))/2;
    $('.cs-buttons').css({margin:'0 0 0 + place_slider_buttons + "px"'})
    Thx

  2. #2
    SitePoint Zealot
    Join Date
    Apr 2003
    Location
    Denmark
    Posts
    127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the answer to my question was

    Code:
    $('.cs-buttons').css('margin-left',place_slider_buttons);


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •